Oprava logiky podmínky

master
David Zálešák 1 year ago
parent 33e0c1e26a
commit 354c4554d7

@ -165,10 +165,10 @@ void notFound(AsyncWebServerRequest *request) {
} }
void thermostatCheck(){ void thermostatCheck(){
if(temperature < (reqTemp - offset)){ if(temperature <= (reqTemp - offset)){
heating = 1; heating = 1;
digitalWrite(RELAY_PIN, !heating); digitalWrite(RELAY_PIN, !heating);
}else if(temperature > (reqTemp + offset)){ }else if(temperature >= (reqTemp + offset)){
heating = 0; heating = 0;
digitalWrite(RELAY_PIN, !heating); digitalWrite(RELAY_PIN, !heating);
} }