Uprava cteni teploty

Uklada do promenne pouze platnou hodnotu.
master
David Zálešák 1 year ago
parent dfa8f5d05f
commit e8f284b291

@ -172,9 +172,13 @@ void thermostatCheck(){
}
void readSensor() {
float tempC = sensor.getTempCByIndex(0);
if(tempC != DEVICE_DISCONNECTED_C){
// read the actual temperature after it's been converted
temperature = sensor.getTempCByIndex(0) + CORRECTION;
temperature = tempC + CORRECTION;
// do what you need with the temperature here
}
metrics = "temp ";
metrics += temperature;
}