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
Diff: RdDS18B20.cpp
- Revision:
- 16:89778849e9f7
- Parent:
- 13:9ec0e11cf3c1
- Child:
- 19:0367cb46d003
--- a/RdDS18B20.cpp Tue Mar 03 17:36:24 2015 +0000 +++ b/RdDS18B20.cpp Mon Sep 28 10:33:14 2015 +0000 @@ -4,7 +4,7 @@ #include "RdDS18B20.h" -// #define SHOW_18B20_DEBUGGING 1 +#define SHOW_18B20_DEBUGGING 1 // Construct onewire bus with desired pin DS18B20::DS18B20(PinName mbedPin) : _oneWire(mbedPin) @@ -131,7 +131,7 @@ return _temperatureTable[addrIdx]; } -void DS18B20::SearchToGetAddresses() +int DS18B20::SearchToGetAddresses() { _numValidAddresses = 0; for (int addrIdx = 0; addrIdx < MAX_BUS_DEVICES; addrIdx++) @@ -185,5 +185,6 @@ break; } #endif - } + } + return _numValidAddresses; }