From ae92fdff2818d486a41dbcacbbf8f774b926ca08 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Mon, 22 Nov 2010 00:15:17 +0000 Subject: [PATCH] Added favicon.ico capability. Made VantagePro.accumulateLoop slightly more robust. --- CHANGES.txt | 7 +++++++ bin/weewx/VantagePro.py | 11 +++++++++-- skins/Standard/favicon.ico | Bin 0 -> 1406 bytes skins/Standard/index.html.tmpl | 3 ++- skins/Standard/month.html.tmpl | 3 ++- skins/Standard/skin.conf | 4 ++-- skins/Standard/week.html.tmpl | 3 ++- skins/Standard/year.html.tmpl | 3 ++- 8 files changed, 26 insertions(+), 8 deletions(-) create mode 100755 skins/Standard/favicon.ico diff --git a/CHANGES.txt b/CHANGES.txt index 59d2324d..41e94365 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ CHANGE HISTORY -------------------------------- +X.X.X + +Add a weewx "favorite icon" favicon.ico that displays in your browser toolbar. + +Changed VantagePro.accumulateLoop to make it slightly more robust. + + 1.9.2 11/20/10 Now catches exception of type OverflowError when calculating celsius dewpoint. diff --git a/bin/weewx/VantagePro.py b/bin/weewx/VantagePro.py index d750a9ee..6d85492d 100644 --- a/bin/weewx/VantagePro.py +++ b/bin/weewx/VantagePro.py @@ -262,8 +262,15 @@ class VantagePro (object) : except (AttributeError, weewx.accum.OutOfSpan): # Initialize the accumulators: self.clearAccumulators(physicalLOOPPacket['dateTime']) - # Try again, calling myself recursively: - self.accumulateLoop(physicalLOOPPacket) + # Try again: + try: + for obs_type in self.special: + self.current_accumulators[obs_type].addToSum(physicalLOOPPacket) + # For battery status, OR every status field together: + self.txBatteryStatus |= physicalLOOPPacket['txBatteryStatus'] + except weewx.accum.OutOfSpan: + # Failed again. There's something wrong. Log it. + syslog.syslog(syslog.LOG_ERR, "VantagePro: Unable to initialize accumulators.") def clearAccumulators(self, time_ts): """Initialize or clear the accumulators""" diff --git a/skins/Standard/favicon.ico b/skins/Standard/favicon.ico new file mode 100755 index 0000000000000000000000000000000000000000..3556f13354149531b28dd8ea655bf7466a4ec63e GIT binary patch literal 1406 zcmeHHI}XAy41H;mih-dltS~UJ075Km;VK|i;#wSnb1?S|Y+Rr`+iIwC1XL&fKC935 z5Ww*?4OH$CSTfpDrL?9x%xE<*U&NRA!Q$HCe0yNkzA$g!IJD1S?-WfNm^Sd28*o|R z`GY=Yf%m*s1q|w03BhvllGnAZg(!Xr2qf` literal 0 HcmV?d00001 diff --git a/skins/Standard/index.html.tmpl b/skins/Standard/index.html.tmpl index e1b71fa4..9fb7699a 100644 --- a/skins/Standard/index.html.tmpl +++ b/skins/Standard/index.html.tmpl @@ -4,12 +4,13 @@ ## $Date$ - + #if $encoding == 'utf8' #end if $station.location Current Weather Conditions +