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: PulsePin.cpp
- Revision:
- 4:0d3a207680b0
- Parent:
- 2:6bfef0839102
- Child:
- 5:5bccf48799d4
diff -r 9f00be404f8f -r 0d3a207680b0 PulsePin.cpp --- a/PulsePin.cpp Fri Nov 07 20:28:48 2014 +0000 +++ b/PulsePin.cpp Mon Feb 02 16:24:30 2015 +0000 @@ -3,10 +3,10 @@ #include "PulsePin.h" -PulsePin::PulsePin(DigitalIn& pin, bool risingEdge, int waitForPinStabilisationMs) : +PulsePin::PulsePin(DigitalIn& pin, bool detectRisingEdge, int waitForPinStabilisationMs) : _pin(pin) { - _risingEdge = risingEdge; + _detectRisingEdge = detectRisingEdge; _waitForPinStabilisationMs = waitForPinStabilisationMs; _pinTimer.start(); _curPinState = _pin; @@ -31,7 +31,7 @@ _lastStableTimeMs = timeNowMs; // Check if this is the direction of edge we're looking for - if (pinState != _risingEdge) + if (pinState != _detectRisingEdge) return false; // Reset the timer to avoid wrap around problems