Monitor for central heating system (e.g. 2zones+hw) Supports up to 15 temp probes (DS18B20/DS18S20) 3 valve monitors Gas pulse meter recording Use stand-alone or with nodeEnergyServer See http://robdobson.com/2015/09/central-heating-monitor

Dependencies:   EthernetInterfacePlusHostname NTPClient Onewire RdWebServer SDFileSystem-RTOS mbed-rtos mbed-src

Revision:
21:ccf053bab795
Parent:
20:7933076df5af
--- a/Thermometers.cpp	Tue Oct 13 18:35:20 2015 +0000
+++ b/Thermometers.cpp	Fri Oct 16 08:37:30 2015 +0000
@@ -122,11 +122,11 @@
                     double tempValue = pThermBus->GetLatestTemperature(addrIdx, timeOfReading);
                     int ageInSecs = time(NULL) - timeOfReading;
                     if (tempValue == DS18B20::INVALID_TEMPERATURE)
-                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.2fC (INVALID) ", tempValue);
-                    else if (ageInSecs == 0)
-                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.2fC ", tempValue);
+                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.1fC (INVALID) ", tempValue);
+                    else if (ageInSecs <= 2)
+                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.1fC ", tempValue);
                     else
-                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.2fC (%dS ago) ", tempValue, ageInSecs);
+                        sprintf(tempStrBuf+strlen(tempStrBuf), "%.1fC (%dS ago) ", tempValue, ageInSecs);
                 }
             }
             _logger.LogDebug("Therm %s", tempStrBuf);