mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 06:14:13 -04:00
save load settings / thread timer fix (#979)
* fixing bad parameter in save and load settings, as well as default settings. Tuned thread timers a bit * uniformisation of default values * indentation * fix resume recon after lock
This commit is contained in:
parent
a86993af91
commit
1e4ea753ba
3 changed files with 38 additions and 38 deletions
|
@ -84,7 +84,21 @@ namespace ui {
|
|||
file_position -= (file_data + 256 - line_start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( it < nb_params )
|
||||
{
|
||||
/* bad number of params, signal defaults */
|
||||
input_file = "RECON" ;
|
||||
output_file = "RECON_RESULTS" ;
|
||||
recon_lock_duration = 50 ;
|
||||
recon_lock_nb_match = 3 ;
|
||||
recon_squelch_level = -14 ;
|
||||
recon_match_mode = 0 ;
|
||||
wait = 1000 ;
|
||||
lock_wait = 1000 ;
|
||||
volume = 40 ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
if( it > 0 )
|
||||
|
@ -105,7 +119,7 @@ namespace ui {
|
|||
if( it > 3 )
|
||||
recon_lock_nb_match = strtoll( params[ 3 ].c_str() , nullptr , 10 );
|
||||
else
|
||||
recon_lock_nb_match = 10 ;
|
||||
recon_lock_nb_match = 3 ;
|
||||
|
||||
if( it > 4 )
|
||||
recon_squelch_level = strtoll( params[ 4 ].c_str() , nullptr , 10 );
|
||||
|
@ -120,7 +134,7 @@ namespace ui {
|
|||
if( it > 6 )
|
||||
wait = strtoll( params[ 6 ].c_str() , nullptr , 10 );
|
||||
else
|
||||
wait = 5000 ;
|
||||
wait = 1000 ;
|
||||
|
||||
if( it > 7 )
|
||||
lock_wait = strtoll( params[ 7 ].c_str() , nullptr , 10 );
|
||||
|
@ -132,11 +146,6 @@ namespace ui {
|
|||
else
|
||||
volume = 40 ;
|
||||
|
||||
if( it < nb_params )
|
||||
{
|
||||
/* bad number of params, signal defaults */
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue