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:
20:7933076df5af
Parent:
19:0367cb46d003
--- a/GasUseCounter.h	Mon Oct 05 14:05:33 2015 +0000
+++ b/GasUseCounter.h	Tue Oct 13 18:35:20 2015 +0000
@@ -3,7 +3,7 @@
 #include "mbed.h"
 #include "PulsePin.h"
 #include "SDFileSystem.h"
-#include <RawSerial.h>
+#include "Logger.h"
 
 const int MAX_GAS_COUNT_STR_LEN = 50;
 const int MAX_PULSES_BEFORE_STORE_NV = 1; // Store at each pulse
@@ -12,8 +12,8 @@
 {
     public:
         // Constructor
-        GasUseCounter(const char* gasUseFilename1, const char* gasUseFilename2, DigitalIn& gasPulsePin, RawSerial &pc) :
-                _gasPulsePin(gasPulsePin), _pc(pc)
+        GasUseCounter(const char* gasUseFilename1, const char* gasUseFilename2, DigitalIn& gasPulsePin, Logger &logger, Mutex &sdCardMutex) :
+                _gasPulsePin(gasPulsePin), _logger(logger), _sdCardMutex(sdCardMutex)
         {
             _gasUseFilename1 = gasUseFilename1;
             _gasUseFilename2 = gasUseFilename2;
@@ -62,7 +62,8 @@
         char _gasCountStr [MAX_GAS_COUNT_STR_LEN];
         DigitalIn& _gasPulsePin;
         PulsePin* _pulseDetector;
-        RawSerial& _pc;
+        Logger &_logger;
+        Mutex &_sdCardMutex;
 };