diff options
Diffstat (limited to 'src/common/Core')
| -rw-r--r-- | src/common/Core/fsm.c | 10 | ||||
| -rw-r--r-- | src/common/Core/main.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/common/Core/fsm.c b/src/common/Core/fsm.c index 52ec8cb..47c349d 100644 --- a/src/common/Core/fsm.c +++ b/src/common/Core/fsm.c @@ -520,10 +520,11 @@ void fsm_update() { " %d AH %c ", capacity_bat_ah, supply_trend); } - if (temperature_valid()) { + float temp = 0; + if (temperature_get(&temp)) { len += snprintf(balise_message + len, BALISE_MESSAGE_LEN-len-1, " T %d ", - (int)(round_float_to_half_steps(temperature_get()))); + (int)(round_float_to_half_steps(temp))); } snprintf(balise_message + len, BALISE_MESSAGE_LEN-len-1, @@ -639,10 +640,11 @@ void fsm_update() { " %d AH ", capacity_bat_ah); } - if (temperature_valid()) { + float temp = 0; + if (temperature_get(&temp)) { len += snprintf(balise_message + len, BALISE_MESSAGE_LEN-len-1, " T %d ", - (int)(round_float_to_half_steps(temperature_get()))); + (int)(round_float_to_half_steps(temp))); } len += snprintf(balise_message+len, BALISE_MESSAGE_LEN-len-1, diff --git a/src/common/Core/main.c b/src/common/Core/main.c index ea393ab..f525221 100644 --- a/src/common/Core/main.c +++ b/src/common/Core/main.c @@ -502,8 +502,8 @@ static void gps_monit_task(void __attribute__ ((unused))*pvParameters) { stats_battery_at_full_hour(time.tm_hour, u_bat, capacity_bat); } - if (temperature_valid()) { - float temp = temperature_get(); + float temp = 0; + if (temperature_get(&temp)) { stats_temp(temp); const char *sign = ""; |
