aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-05 22:28:48 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-06-05 22:28:48 +0200
commite49df0eb82f74cf86d801f8b0273d4825aa426fd (patch)
tree02f018c0662c4124b97915f41b45495c24e2c8c4 /src
parent32595fa17b5220f4598e7f307e40289d05af3cc3 (diff)
downloadglutte-o-matic-e49df0eb82f74cf86d801f8b0273d4825aa426fd.tar.gz
glutte-o-matic-e49df0eb82f74cf86d801f8b0273d4825aa426fd.tar.bz2
glutte-o-matic-e49df0eb82f74cf86d801f8b0273d4825aa426fd.zip
Enable audio depending on TX_ON
This removes the glitch issue
Diffstat (limited to 'src')
-rw-r--r--src/common/src/Audio/cw.c6
-rw-r--r--src/common/src/Core/main.c6
2 files changed, 6 insertions, 6 deletions
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