diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-30 12:55:01 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-30 12:55:01 +0100 |
commit | 9af7039353c25b8a24861491cdfac81353b86ef7 (patch) | |
tree | 929b747c768cfbd2cf08f7cf5207e1f3339678b7 /src/common/Core/main.c | |
parent | ed3ba0ee7d8546711be9d4c800dc4f4f0a81aedf (diff) | |
download | glutte-o-matic-9af7039353c25b8a24861491cdfac81353b86ef7.tar.gz glutte-o-matic-9af7039353c25b8a24861491cdfac81353b86ef7.tar.bz2 glutte-o-matic-9af7039353c25b8a24861491cdfac81353b86ef7.zip |
Add bonne annee
Diffstat (limited to 'src/common/Core/main.c')
-rw-r--r-- | src/common/Core/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/Core/main.c b/src/common/Core/main.c index 52f1663..e1ae35d 100644 --- a/src/common/Core/main.c +++ b/src/common/Core/main.c @@ -600,11 +600,12 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) uint64_t last_qrp_stats_updated = timestamp_now(); - fsm_input.humidity = 0; fsm_input.temp = 15; fsm_input.swr_high = 0; fsm_input.fax_mode = 0; fsm_input.wind_generator_ok = 1; + fsm_input.send_stats = 0; + fsm_input.bonne_annee = 0; while (1) { vTaskDelay(pdMS_TO_TICKS(10)); @@ -681,8 +682,14 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) if (!time_valid) { time_valid = local_derived_time(&time); } + if (time_valid) { fsm_input.send_stats = (time.tm_hour == 22) ? 1 : 0; + fsm_input.bonne_annee = (gps_time.tm_mon == 0 && gps_time.tm_mday <= 5); + } + else { + fsm_input.send_stats = 0; + fsm_input.bonne_annee = 0; } fsm_update_inputs(&fsm_input); |