aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMaximilien Cuony <maximilien@theglu.org>2016-06-05 22:29:22 +0200
committerMaximilien Cuony <maximilien@theglu.org>2016-06-05 22:29:22 +0200
commit9e6e9714a498467074b51124a9353002d9087a46 (patch)
tree6e9c02a0abcdd4cd9cc4ded59a77a28031e995eb /src/common
parent765b06950c1a5b55bb96a29f9da3c136f790a0f2 (diff)
parente49df0eb82f74cf86d801f8b0273d4825aa426fd (diff)
downloadglutte-o-matic-9e6e9714a498467074b51124a9353002d9087a46.tar.gz
glutte-o-matic-9e6e9714a498467074b51124a9353002d9087a46.tar.bz2
glutte-o-matic-9e6e9714a498467074b51124a9353002d9087a46.zip
Merge branch 'master' of github.com:Glutte/glutt-o-matique
Diffstat (limited to 'src/common')
-rw-r--r--src/common/src/Audio/cw.c6
-rw-r--r--src/common/src/Core/common.c4
-rw-r--r--src/common/src/Core/main.c6
3 files changed, 8 insertions, 8 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/common.c b/src/common/src/Core/common.c
index 6f608ad..77d3360 100644
--- a/src/common/src/Core/common.c
+++ b/src/common/src/Core/common.c
@@ -150,7 +150,7 @@ int local_time(struct tm *time) {
void common_init(void)
{
common_timer = xTimerCreate("Timer",
- portTICK_PERIOD_MS,
+ pdMS_TO_TICKS(10),
pdTRUE, // Auto-reload
NULL, // No unique id
common_increase_timestamp
@@ -176,7 +176,7 @@ static void common_increase_timestamp(TimerHandle_t t)
}
#else
- common_timestamp++;
+ common_timestamp += 10;
#endif
}
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