diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/src/Audio/cw.c | 6 | ||||
-rw-r--r-- | src/common/src/Core/common.c | 4 | ||||
-rw-r--r-- | src/common/src/Core/main.c | 6 | ||||
-rw-r--r-- | src/glutt-o-logique/pio.c | 5 |
4 files changed, 11 insertions, 10 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 diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c index d8780fe..c003881 100644 --- a/src/glutt-o-logique/pio.c +++ b/src/glutt-o-logique/pio.c @@ -37,7 +37,7 @@ #define GPIO_PIN_QRP_out GPIO_Pin_9 #define GPIO_PIN_D GPIO_Pin_11 #define GPIO_PIN_REPLIE_n GPIO_Pin_13 -#define GPIO_PIN_FAX_n GPIO_Pin_14 +#define GPIO_PIN_FAX GPIO_Pin_14 #define GPIOC_OUTPUT_PINS ( \ @@ -56,6 +56,7 @@ GPIO_PIN_U | \ GPIO_PIN_D | \ GPIO_PIN_REPLIE_n | \ + GPIO_PIN_FAX | \ 0 ) #include "GPIO/pio.h" @@ -146,7 +147,7 @@ void read_fsm_input_task(void *pvParameters) GPIO_ReadInputDataBit(GPIOC, GPIO_PIN_REPLIE_n) ? 1 : 0; pio_signals.sstv_mode = - GPIO_ReadInputDataBit(GPIOC, GPIO_PIN_FAX_n) ? 0 : 1; + GPIO_ReadInputDataBit(GPIOC, GPIO_PIN_FAX) ? 1 : 0; vTaskDelay(100 / portTICK_RATE_MS); } |