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:
gullradriel 2023-05-12 12:06:01 +02:00 committed by GitHub
parent a86993af91
commit 1e4ea753ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 38 deletions

View file

@ -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 ;
}