diff options
author | Maximilien Cuony <maximilien@theglu.org> | 2016-09-04 17:43:57 +0200 |
---|---|---|
committer | Maximilien Cuony <maximilien@theglu.org> | 2016-09-04 17:43:57 +0200 |
commit | ef6aff66dc9f773d53aaf3073daa1181a0ffa89b (patch) | |
tree | 6c6a67777a6de87d893caf1d63fd878672eadceb | |
parent | fe8eb047b7350436a79eaf2c3c3b6e937d2f2d50 (diff) | |
download | glutte-o-matic-ef6aff66dc9f773d53aaf3073daa1181a0ffa89b.tar.gz glutte-o-matic-ef6aff66dc9f773d53aaf3073daa1181a0ffa89b.tar.bz2 glutte-o-matic-ef6aff66dc9f773d53aaf3073daa1181a0ffa89b.zip |
Add more logging for even time
-rw-r--r-- | src/common/src/Core/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index 6dbe697..ab37d3e 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -338,6 +338,8 @@ static void gps_monit_task(void __attribute__ ((unused))*pvParameters) { int t_gps_hours_handeled = 0; uint64_t last_hour_timestamp = 0; + int last_even = -1; + while (1) { struct tm time; @@ -373,6 +375,13 @@ static void gps_monit_task(void __attribute__ ((unused))*pvParameters) { if (time_valid) { fsm_input.hour_is_even = (time.tm_hour + 1) % 2; + + if (last_even != fsm_input.hour_is_even) { + last_even = fsm_input.hour_is_even; + + usart_debug("Even changed: %i %i %i %i\r\n", fsm_input.hour_is_even, time.tm_hour, derived_mode); + + } } gps_utctime(&gps_time); |