diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-12-17 15:11:10 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-12-17 15:13:47 +0100 |
commit | 6f00ffb0f016413522bd54dc9e44beb92864df02 (patch) | |
tree | 7fc919bbfd84cd6da35d1e36ae22fa85d3b9729b /src/common/Core/fsm.c | |
parent | 7f46a3879c9c76aa817cc27fb39718b8dd813f96 (diff) | |
download | glutte-o-matic-6f00ffb0f016413522bd54dc9e44beb92864df02.tar.gz glutte-o-matic-6f00ffb0f016413522bd54dc9e44beb92864df02.tar.bz2 glutte-o-matic-6f00ffb0f016413522bd54dc9e44beb92864df02.zip |
Keep temperature valid for 15 minutes
Diffstat (limited to 'src/common/Core/fsm.c')
-rw-r--r-- | src/common/Core/fsm.c | 10 |
1 files changed, 6 insertions, 4 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, |