Uprava cteni teploty
Uklada do promenne pouze platnou hodnotu.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user