diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-02 17:49:26 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-02 17:49:26 +0100 |
commit | a8107b3b360449d2edb6f9dc122ed47de88ed3bc (patch) | |
tree | 7e9bcde93a1183a1ec1b343286e0e2b0dad1cf8f /src | |
parent | e56078d26660f56525872ae663cf95f3fd8f425d (diff) | |
download | glutte-o-matic-a8107b3b360449d2edb6f9dc122ed47de88ed3bc.tar.gz glutte-o-matic-a8107b3b360449d2edb6f9dc122ed47de88ed3bc.tar.bz2 glutte-o-matic-a8107b3b360449d2edb6f9dc122ed47de88ed3bc.zip |
rename fsm input variables
Diffstat (limited to 'src')
-rw-r--r-- | src/common/includes/Core/fsm.h | 7 | ||||
-rw-r--r-- | src/common/src/Core/main.c | 10 | ||||
-rw-r--r-- | src/glutt-o-logique/pio.c | 6 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/common/includes/Core/fsm.h b/src/common/includes/Core/fsm.h index e562241..f8a800c 100644 --- a/src/common/includes/Core/fsm.h +++ b/src/common/includes/Core/fsm.h @@ -78,8 +78,11 @@ struct fsm_input_signals_t { float humidity; // relative humidity, range [0-100] % int wind_generator_ok; // false if the generator is folded out of the wind int discrim_d; // FM discriminator says RX is too low in frequency - int tone_1750; // Detect 1750Hz tone - int sstv_mode; // The 1750Hz filter is disabled, permitting SSTV usage + int button_1750; // Front panel button 1750Hz + + /* Signals coming from FAX and 1750 detector */ + int fax_mode; // 1750Hz filter disabled for machine-generated modes + int det_1750; // 1750Hz detected /* Signals coming from CW and PSK generator */ int cw_psk31_done; // The CW and PSK generator has finished transmitting the message diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index 3fe441f..5ccc768 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -493,7 +493,7 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) fsm_input.humidity = 0; fsm_input.temp = 15; fsm_input.swr_high = 0; - fsm_input.sstv_mode = 0; + fsm_input.fax_mode = 0; fsm_input.wind_generator_ok = 1; while (1) { @@ -505,10 +505,6 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) last_sq = fsm_input.sq; usart_debug("In SQ %d\r\n", last_sq); } - if (last_1750 != fsm_input.tone_1750) { - last_1750 = fsm_input.tone_1750; - usart_debug("In 1750 %d\r\n", last_1750); - } if (last_qrp != fsm_input.qrp) { last_qrp = fsm_input.qrp; usart_debug("In QRP %d\r\n", last_qrp); @@ -555,6 +551,10 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) leds_turn_on(LED_ORANGE); } +#warning "TODO: from tone detector" + fsm_input.det_1750 = 0; + fsm_input.fax_mode = 0; + fsm_input.swr_high = swr_error_flag; fsm_input.hour_is_even = hour_is_even; diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c index caf29bc..e944671 100644 --- a/src/glutt-o-logique/pio.c +++ b/src/glutt-o-logique/pio.c @@ -263,16 +263,12 @@ void read_fsm_input_task(void __attribute__ ((unused))*pvParameters) GPIO_ReadInputDataBit(GPIOC, GPIOC_PIN_1750_n) ? 0 : 1; if (all_equal(debounce_1750, DEBOUNCE_LEN_1750)) { - pio_signals.tone_1750 = debounce_1750[0]; + pio_signals.button_1750 = debounce_1750[0]; } pio_signals.wind_generator_ok = GPIO_ReadInputDataBit(GPIOC, GPIOC_PIN_REPLIE) ? 0 : 1; -#warning "TODO: remove sstv_mode" - pio_signals.sstv_mode = - GPIO_ReadInputDataBit(GPIOC, GPIOC_PIN_FAX) ? 1 : 0; - vTaskDelay(pdMS_TO_TICKS(100)); } } |