diff options
Diffstat (limited to 'src/common/Core/main.c')
-rw-r--r-- | src/common/Core/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/Core/main.c b/src/common/Core/main.c index d5528d9..45b5091 100644 --- a/src/common/Core/main.c +++ b/src/common/Core/main.c @@ -463,9 +463,14 @@ static void gps_monit_task(void __attribute__ ((unused))*pvParameters) { stats_voltage_at_full_hour(time.tm_hour, u_bat); } - const float temp = temperature_get(); - stats_temp(temp); - usart_debug("TEMP %d.%02d\r\n", (int)temp, (int)(temp * 100.0f - (int)(temp) * 100.0f)); + if (temperature_valid()) { + const float temp = temperature_get(); + stats_temp(temp); + usart_debug("TEMP %d.%02d\r\n", (int)temp, (int)(temp * 100.0f - (int)(temp) * 100.0f)); + } + else { + usart_debug("TEMP invalid\r\n"); + } last_volt_and_temp_timestamp = now; } |