From e49df0eb82f74cf86d801f8b0273d4825aa426fd Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 5 Jun 2016 22:28:48 +0200 Subject: Enable audio depending on TX_ON This removes the glitch issue --- src/common/src/Audio/cw.c | 6 ------ src/common/src/Core/main.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/common/src/Audio/cw.c b/src/common/src/Audio/cw.c index 36f2d09..e4a04f5 100644 --- a/src/common/src/Audio/cw.c +++ b/src/common/src/Audio/cw.c @@ -528,9 +528,6 @@ static void cw_psk31_task(void *pvParameters) cw_transmit_ongoing = 1; - // Audio should be off, turn it on - audio_on(); - if (cw_fill_msg_current.dit_duration) { cw_psk31_buffer_len = cw_text_to_on_buffer( cw_fill_msg_current.message, @@ -594,9 +591,6 @@ static void cw_psk31_task(void *pvParameters) // We have completed this message cw_transmit_ongoing = 0; - - // Turn off audio to save power - audio_off(); } } } diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index 27925b9..6a546a1 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -425,6 +425,12 @@ static void exercise_fsm(void *pvParameters) fsm_get_outputs(&fsm_out); pio_set_tx(fsm_out.tx_on); + if (fsm_out.tx_on) { + audio_on(); + } + else { + audio_off(); + } pio_set_mod_off(!fsm_out.modulation); pio_set_qrp(fsm_out.qrp); // TODO move out of FSM -- cgit v1.2.3