Added favicon.ico capability.

Made VantagePro.accumulateLoop slightly more robust.
This commit is contained in:
Tom Keffer
2010-11-22 00:15:17 +00:00
parent c788bc8634
commit ae92fdff28
8 changed files with 26 additions and 8 deletions

View File

@@ -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.

View File

@@ -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"""

BIN
skins/Standard/favicon.ico Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -4,12 +4,13 @@
## $Date$
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head profile="http://www.w3.org/2005/10/profile">
#if $encoding == 'utf8'
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#end if
<title>$station.location Current Weather Conditions</title>
<link rel="stylesheet" type="text/css" href="weewx.css"/>
<link rel="icon" type="image/png" href="favicon.ico" />
<script type="text/javascript">
function openURL(urlname)
{

View File

@@ -4,12 +4,13 @@
## $Date$
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head profile="http://www.w3.org/2005/10/profile">
#if $encoding == 'utf8'
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#end if
<title>$station.location Monthly weather summary</title>
<link rel="stylesheet" type="text/css" href="weewx.css"/>
<link rel="icon" type="image/png" href="favicon.ico" />
<script type="text/javascript">
function openURL(urlname)
{

View File

@@ -30,7 +30,7 @@
# Here's another. If you have a Google Analytics ID, uncomment and edit
# the next line, and the analytics code will automatically be included
# in your generated HTML files:
# in your generated HTML files:
#googleAnalyticsId = UA-12345678-1
############################################################################################
@@ -250,7 +250,7 @@
#
# List of files that are to be copied at the first invocation of the generator only
copy_once = backgrounds/*, weewx.css
copy_once = backgrounds/*, weewx.css, favicon.ico
# List of files to be copied every time:
# copy_always =

View File

@@ -4,12 +4,13 @@
## $Date$
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head profile="http://www.w3.org/2005/10/profile">
#if $encoding == 'utf8'
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#end if
<title>$station.location Weekly weather summary</title>
<link rel="stylesheet" type="text/css" href="weewx.css"/>
<link rel="icon" type="image/png" href="favicon.ico" />
<script type="text/javascript">
function openURL(urlname)
{

View File

@@ -4,12 +4,13 @@
## $Date$
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head profile="http://www.w3.org/2005/10/profile">
#if $encoding == 'utf8'
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
#end if
<title>$station.location Yearly weather summary</title>
<link rel="stylesheet" type="text/css" href="weewx.css"/>
<link rel="icon" type="image/png" href="favicon.ico" />
<script type="text/javascript">
function openURL(urlname)
{