Merge pull request #750 from gullradriel/recon-delete-retune-fix

Retune after delete fix
This commit is contained in:
gullradriel 2022-11-20 20:14:47 +01:00 committed by GitHub
commit 7f64606fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1000,23 +1000,32 @@ namespace ui {
delete_file( "FREQMAN/"+output_file+".TXT" ); delete_file( "FREQMAN/"+output_file+".TXT" );
} }
if( recon_thread ) if( recon_thread )
{ {
recon_thread->set_freq_index( current_index ); timer = 0 ;
timer = 0 ;
recon_thread->set_freq_index( current_index );
RetuneMessage message { };
receiver_model.set_tuning_frequency( frequency_list[ current_index ] . frequency_a ); // Retune
message.freq = frequency_list[ current_index ] . frequency_a ;
message.range = current_index ;
EventDispatcher::send_message(message);
chThdSleepMilliseconds( recon_lock_duration ); // give some time to Thread::Run to pause
if( previous_userpause )
{
user_pause();
}
else
{
user_resume();
}
if( previous_userpause ) recon_thread->set_freq_delete(false);
{ recon_thread->set_recon( previous_is_recon );
user_pause(); }
}
else
{
user_resume();
}
recon_thread->set_recon( previous_is_recon );
recon_thread->set_freq_delete(false);
chThdSleepMilliseconds( recon_lock_duration ); // give some time to Thread::Run to pause
}
}; };
button_remove.on_change = [this]() { button_remove.on_change = [this]() {