break windspeed validation check if it set to zero

master
Mateusz Lubecki 2024-04-20 14:50:33 +02:00
rodzic 9b52612eec
commit 15829704be
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -10,7 +10,7 @@
#ifndef ETC_MISC_CONFIG_H_
#define ETC_MISC_CONFIG_H_
#define RTE_WX_PROBLEMS_MAX_THRESHOLD 20
#define RTE_WX_PROBLEMS_MAX_THRESHOLD 10

Wyświetl plik

@ -154,6 +154,12 @@ int8_t rte_wx_check_weather_measurements(void) {
if (rte_wx_windspeed[i] != rte_wx_windspeed[i + 1]) {
break;
}
// break the loop if the windspeed is zero anywhere, not to reset
// periodically if wind sensor is not connected.
if (rte_wx_windspeed[i] == 0) {
break;
}
}
// check if an end of the buffer has been reached