From c8f49ca5793ec6fac36a166f5874e1c8602216ce Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Fri, 8 Apr 2011 23:04:44 +0000 Subject: [PATCH 1/3] Branch for tracking down VP2 data gap bug From 8b19b04fde451cf2b2baa510aef030315bd81fd6 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Fri, 8 Apr 2011 23:36:41 +0000 Subject: [PATCH 2/3] Added additional debugging to VantagePro.py --- bin/weewx/VantagePro.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/weewx/VantagePro.py b/bin/weewx/VantagePro.py index 399a10a2..0759d308 100644 --- a/bin/weewx/VantagePro.py +++ b/bin/weewx/VantagePro.py @@ -221,6 +221,7 @@ class VantagePro (object) : # be unused records, which are filled with 0xff: if _page[1+52*_index:53+52*_index] == 52*chr(0xff) : # This record has never been used. We're done. + syslog.syslog(syslog.LOG_DEBUG, "VantagePro: empty record page %d; index %d" % (unused_ipage, _index)) return # Unpack the raw archive packet: _packet = unpackArchivePacket(_page[1+52*_index:53+52*_index]) @@ -239,6 +240,8 @@ class VantagePro (object) : # decline up to the DST delta. if _record['dateTime'] is None or _record['dateTime'] + self.dst_delta <= _last_good_ts : # The time stamp is declining. We're done. + syslog.syslog(syslog.LOG_DEBUG, "VantagePro: time stamp declining. Record timestamp " +\ + str(_record['dateTime']) + "; last good timestamp " + str(_last_good_ts)) return # Augment the record with the data from the accumulators: self.archiveAccumulators(_record) From e3b9d46c589b528bdc75ab8449d3de7959a19451 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Mon, 11 Apr 2011 00:11:39 +0000 Subject: [PATCH 3/3] Prettied up debug log output --- bin/weewx/VantagePro.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/weewx/VantagePro.py b/bin/weewx/VantagePro.py index 0759d308..512cfa82 100644 --- a/bin/weewx/VantagePro.py +++ b/bin/weewx/VantagePro.py @@ -221,7 +221,8 @@ class VantagePro (object) : # be unused records, which are filled with 0xff: if _page[1+52*_index:53+52*_index] == 52*chr(0xff) : # This record has never been used. We're done. - syslog.syslog(syslog.LOG_DEBUG, "VantagePro: empty record page %d; index %d" % (unused_ipage, _index)) + syslog.syslog(syslog.LOG_DEBUG, "VantagePro: empty record page %d; index %d" \ + % (unused_ipage, _index)) return # Unpack the raw archive packet: _packet = unpackArchivePacket(_page[1+52*_index:53+52*_index]) @@ -240,8 +241,10 @@ class VantagePro (object) : # decline up to the DST delta. if _record['dateTime'] is None or _record['dateTime'] + self.dst_delta <= _last_good_ts : # The time stamp is declining. We're done. - syslog.syslog(syslog.LOG_DEBUG, "VantagePro: time stamp declining. Record timestamp " +\ - str(_record['dateTime']) + "; last good timestamp " + str(_last_good_ts)) + syslog.syslog(syslog.LOG_DEBUG, "VantagePro: time stamps declining. Record timestamp %s" \ + % weeutil.weeutil.timestamp_to_string(_record['dateTime'])) + syslog.syslog(syslog.LOG_DEBUG, " **** Last good timestamp %s" \ + % weeutil.weeutil.timestamp_to_string(_last_good_ts)) return # Augment the record with the data from the accumulators: self.archiveAccumulators(_record)