/* Feed the dog if sensor values are relevant */
int allow_wd_feed = 1;
if ((solar_prod_value == 0) || (home_conso_value == 0)) {
+ /* The sensors cannot read as 0, this is an ADC initialisation error */
allow_wd_feed = 0;
}
- if ((water_centi_degrees < 0) || (water_centi_degrees > (ABSOLUTE_MAX_WATER_TEMP + 200))) {
+ if ((water_centi_degrees <= 0) || (water_centi_degrees > (ABSOLUTE_MAX_WATER_TEMP + 200))) {
+ /* This is certainly a thermocouple reading error : reset */
allow_wd_feed = 0;
}
/* Blocked in overvoltage mode */
}
/* Blocked in overtemperature mode */
if (mode == mode_overtemp) {
- if ((mosfet_temp_shutdown == 0) && (internal_temp_error_shutdown >= 0)) {
+ if ((mosfet_temp_shutdown == 0) && (internal_temp_error_shutdown == 0)) {
allow_wd_feed = 0;
}
}