From ef8e9b604bb024114d35ccca77dc481b22a3410a Mon Sep 17 00:00:00 2001 From: Stuart Pittaway Date: Fri, 27 Apr 2012 20:27:52 +0100 Subject: [PATCH] Fixed issue with previous release where random data was uploaded --- nanodesmapvmonitor.ino | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nanodesmapvmonitor.ino b/nanodesmapvmonitor.ino index e6f9e09..0fc5e71 100644 --- a/nanodesmapvmonitor.ino +++ b/nanodesmapvmonitor.ino @@ -41,6 +41,8 @@ static time_t SummerStart=1332637200; //Sun, 25 Mar 2012 01:00:00 GMT static time_t SummerEnd=1351386000; //Sun, 28 Oct 2012 01:00:00 GMT + + //SMA inverter timezone (note inverter appears ignores summer time saving internally) //Need to determine what happens when its a NEGATIVE time zone ! //Number of seconds for timezone @@ -174,8 +176,6 @@ void loop() checkIfNeedToSetInverterTime(); - - //getInverterName(); //HistoricData(); @@ -397,7 +397,7 @@ prog_uchar PROGMEM smanet2totalyieldWh[]= { 0x54, 0x00, 0x01, 0x26, 0x00, 0xFF, 0x01, 0x26, 0x00}; void getTotalPowerGeneration() { - //Gets the total kWh the SMA inverterhas generated in its lifetime... + //Gets the total kWh the SMA inverter has generated in its lifetime... do { writePacketHeader(level1packet); writeSMANET2PlusPacket(level1packet,0x09, 0xa0, packet_send_counter, 0, 0, 0); @@ -415,7 +415,7 @@ void getTotalPowerGeneration() { //displaySpotValues(16); memcpy(&datetime,&level1packet[40+1+4],4); - //memcpy(&value,&level1packet[40+1+8],3); + memcpy(&value,&level1packet[40+1+8],3); //digitalClockDisplay(datetime); //debugMsg('=');Serial.println(value); currentvalue=value; @@ -425,7 +425,6 @@ static time_t setTimePeriodically() { return getNtpTime(); } - void initialiseSMAConnection() { //Wait for announcement/broadcast message from PV inverter