Fix "Stop After" Freeze.

This commit is contained in:
dqs105 2020-09-19 14:22:28 +08:00 committed by GitHub
parent 55783a60f5
commit 1029322405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,11 @@ SigGenView::~SigGenView() {
} }
void SigGenView::update_config() { void SigGenView::update_config() {
if(checkbox_stop.value())
baseband::set_siggen_config(transmitter_model.channel_bandwidth(), options_shape.selected_index_value(), field_stop.value()); baseband::set_siggen_config(transmitter_model.channel_bandwidth(), options_shape.selected_index_value(), field_stop.value());
else
baseband::set_siggen_config(transmitter_model.channel_bandwidth(), options_shape.selected_index_value(), 0);
} }
void SigGenView::update_tone() { void SigGenView::update_tone() {
@ -68,9 +72,11 @@ void SigGenView::start_tx() {
void SigGenView::on_tx_progress(const uint32_t progress, const bool done) { void SigGenView::on_tx_progress(const uint32_t progress, const bool done) {
(void) progress; (void) progress;
if (done) if (done) {
transmitter_model.disable();
tx_view.set_transmitting(false); tx_view.set_transmitting(false);
} }
}
SigGenView::SigGenView( SigGenView::SigGenView(
NavigationView& nav NavigationView& nav
@ -98,6 +104,8 @@ SigGenView::SigGenView(
options_shape.set_selected_index(0); options_shape.set_selected_index(0);
text_shape.set(shape_strings[0]); text_shape.set(shape_strings[0]);
field_stop.set_value(1);
symfield_tone.set_sym(1, 1); // Default: 1000 Hz symfield_tone.set_sym(1, 1); // Default: 1000 Hz
symfield_tone.on_change = [this]() { symfield_tone.on_change = [this]() {
if (auto_update) if (auto_update)