#include #include "wattlight.h" class PowerSerial { static const char* PATTERN; const char* name; HardwareSerial* serial; const char* pp; unsigned long kwhtemp[2]; char n; unsigned long ms; unsigned long maxage; public: Wattlight light; unsigned long kwh[2], count; void begin (const char* _name, HardwareSerial& _serial, unsigned long _maxage, volatile uint8_t & ucsrc, uint8_t ucsz0, uint8_t upm1); void parseMe (); static PowerSerial power, solar; static void setup(); static void parse(); }; #define FROMNET PowerSerial::power.kwh[0] #define INTONET PowerSerial::power.kwh[1] #define SOLAR PowerSerial::solar.kwh[1]