mirror of
https://github.com/weewx/weewx.git
synced 2026-04-18 16:46:56 -04:00
prevent fine offset stations from saving data with zero interval
This commit is contained in:
@@ -220,7 +220,7 @@ import weewx.drivers
|
||||
import weewx.wxformulas
|
||||
|
||||
DRIVER_NAME = 'FineOffsetUSB'
|
||||
DRIVER_VERSION = '1.9'
|
||||
DRIVER_VERSION = '1.10'
|
||||
|
||||
def loader(config_dict, engine):
|
||||
return FineOffsetUSB(**config_dict[DRIVER_NAME])
|
||||
@@ -1318,7 +1318,7 @@ class FineOffsetUSB(weewx.drivers.AbstractDevice):
|
||||
while dts > dt and count < num_rec:
|
||||
raw_data = self.get_raw_data(ptr)
|
||||
data = self.decode(raw_data)
|
||||
if data['delay'] is None or data['delay'] > 30:
|
||||
if data['delay'] is None or data['delay'] < 1 or data['delay'] > 30:
|
||||
logerr('invalid data in get_records at 0x%04x, %s' %
|
||||
(ptr, dts.isoformat()))
|
||||
dts -= datetime.timedelta(minutes=fixed_block['read_period'])
|
||||
|
||||
@@ -63,6 +63,9 @@ Fixed bug in WS1 driver that caused crash if rain_total was None.
|
||||
If a file user/schemas.py still exists (a relic from V2.7 and earlier), it
|
||||
is renamed to user/schemas.py.old. Fixes issue #54.
|
||||
|
||||
Fixed fine offset driver to warn about (and skip) historical data that have
|
||||
zero for interval.
|
||||
|
||||
|
||||
3.9.1 02/06/2019
|
||||
|
||||
|
||||
Reference in New Issue
Block a user