Merge pull request #191 from dqs105/siggen_fix

SigGen "Stop after" freeze fix & stronger CW signal
This commit is contained in:
Erwin Ried 2020-09-20 15:08:26 +02:00 committed by GitHub
commit 17cb092978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -43,7 +43,11 @@ SigGenView::~SigGenView() {
} }
void SigGenView::update_config() { void SigGenView::update_config() {
baseband::set_siggen_config(transmitter_model.channel_bandwidth(), options_shape.selected_index_value(), field_stop.value()); if(checkbox_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,8 +72,10 @@ 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(
@ -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)

View File

@ -33,6 +33,7 @@ void SigGenProcessor::execute(const buffer_c8_t& buffer) {
for (size_t i = 0; i < buffer.count; i++) { for (size_t i = 0; i < buffer.count; i++) {
if (!sample_count && auto_off) { if (!sample_count && auto_off) {
configured = false;
txprogress_message.done = true; txprogress_message.done = true;
shared_memory.application_queue.push(txprogress_message); shared_memory.application_queue.push(txprogress_message);
} else } else
@ -40,7 +41,7 @@ void SigGenProcessor::execute(const buffer_c8_t& buffer) {
if (tone_shape == 0) { if (tone_shape == 0) {
// CW // CW
re = 0; re = 127;
im = 0; im = 0;
} else { } else {