diff --git a/bin/weewx/wmr200.py b/bin/weewx/wmr200.py index 2f5ff02b..8800d5e4 100644 --- a/bin/weewx/wmr200.py +++ b/bin/weewx/wmr200.py @@ -104,7 +104,7 @@ class UsbDevice(object): if not self.dev: return False - # Open the device and get a handle. + # Open the device and get a handle. try: self.handle = self.dev.open() except usb.USBError, e: @@ -288,11 +288,11 @@ class Packet(object): if self._SizeActual() < 2: print 'Packet too small to compute 16 bit checksum' return - sum = 0 + checksum = 0 # Checksum is last two bytes in packet. for byte in self.pkt_data[:-2]: - sum += byte - return sum + checksum += byte + return checksum def _checkSumField(self): """Returns the checksum field of the current packet @@ -623,9 +623,9 @@ class PacketTemperature(Packet): # _record['windchill'] # = weewx.wxformulas.windchillC(T, # self.last_wind_record['windSpeed']) - # except AttributeError: - # pass - # _record['outTempBatteryStatus'] = (packet[0] & 0x40) >> 6 + # except AttributeError: + # pass + # _record['outTempBatteryStatus'] = (packet[0] & 0x40) >> 6 elif sensor_id >= 2: # If additional temperature sensors exist (channel>=2), then # use observation types 'extraTemp1', 'extraTemp2', etc. @@ -823,7 +823,7 @@ class WMR200(weewx.abstractstation.AbstractStation): # Buffer of bytes read from console device. self.buf = [] - # Access the console via the usb accessor. + # Access the console via the usb accPacketHistoryReadessor. self.usb_device = UsbDevice(vendor_id, product_id) self.usb_device.timeout = float(stn_dict.get('timeout', 15.0)) @@ -964,7 +964,7 @@ class WMR200(weewx.abstractstation.AbstractStation): while self.buf: yield self.buf.pop(0) - except (IndexError, usb.USBError), e: + except (IndexError, usb.USBError), e: # @UnusedVariable yield None def _PollForData(self): diff --git a/docs/usersguide.htm b/docs/usersguide.htm index 838e89b8..e3870250 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -26,7 +26,7 @@ function showtab(tab,id) { document.getElementById(tab+'-tab-'+id).className = 'tab selected'; } - +
@@ -108,21 +108,21 @@ Version: 2.2.1max_tries
How many times to try again before giving up. Default is 4.
-This section is for options relating to the Oregon Scientific WMR series +
This section is for options relating to the Oregon Scientific WMR100 series of weather stations with USB connectors.
stale_wind
How long a wind record can be used to calculate wind chill (in seconds). Default is 30.
-This section is for options relating to the Oregon Scientific WMR-918 +
This section is for options relating to the Oregon Scientific WMR200 series + of weather stations with USB connectors. This support is experimental. Please + report any problems!
+stale_wind
+How long a wind record can be used to calculate wind chill (in seconds). + Default is 30.
+ +This section is for options relating to the Oregon Scientific WMR-918/968 series of weather stations with serial connectors.
type
For the moment, only serial is supported.
diff --git a/weewx.conf b/weewx.conf index 3109d3d8..43820c8b 100644 --- a/weewx.conf +++ b/weewx.conf @@ -62,6 +62,7 @@ version = 2.2.1 # Set to type of station hardware. Supported stations include: # Vantage # WMR100 + # WMR200 # WMR9x8 # FineOffsetUSB # Simulator @@ -143,6 +144,25 @@ version = 2.2.1 ############################################################################################ +[WMR200] + + # + # This section is for the Oregon Scientific WMR200 + # + + ###################################################### + # The rest of this section rarely needs any attention. + # You can safely leave it "as is." + ###################################################### + + # How long a wind record can be used to calculate wind chill (in seconds) + stale_wind = 30 + + # The driver to use + driver = weewx.wmr200 + +############################################################################################ + [WMR9x8] #