mirror of
https://github.com/weewx/weewx.git
synced 2026-04-19 09:06:58 -04:00
Fix problem that creates 'ghost' values for VantageVue stations.
Fixes issue #771.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (c) 2009-2021 Tom Keffer <tkeffer@gmail.com>
|
||||
# Copyright (c) 2009-2022 Tom Keffer <tkeffer@gmail.com>
|
||||
#
|
||||
# See the file LICENSE.txt for your full rights.
|
||||
#
|
||||
@@ -33,7 +33,7 @@ from weewx.crc16 import crc16
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
DRIVER_NAME = 'Vantage'
|
||||
DRIVER_VERSION = '3.2.3'
|
||||
DRIVER_VERSION = '3.3.0'
|
||||
|
||||
|
||||
def loader(config_dict, engine):
|
||||
@@ -1480,6 +1480,9 @@ class Vantage(weewx.drivers.AbstractDevice):
|
||||
}
|
||||
# Now we need to map the raw values to physical units.
|
||||
for _type in raw_loop_packet:
|
||||
if _type in extra_sensors and self.hardware_type == 17:
|
||||
# Vantage Vues do not support extra sensors. Skip them.
|
||||
continue
|
||||
# Get the mapping function for this type. If there is
|
||||
# no such function, supply a lambda function that returns None
|
||||
func = _loop_map.get(_type, lambda p, k: None)
|
||||
@@ -1554,6 +1557,9 @@ class Vantage(weewx.drivers.AbstractDevice):
|
||||
raw_archive_record['wind_samples'])
|
||||
|
||||
for _type in raw_archive_record:
|
||||
if _type in extra_sensors and self.hardware_type == 17:
|
||||
# VantageVues do not support extra sensors. Skip them.
|
||||
continue
|
||||
# Get the mapping function for this type. If there is no such
|
||||
# function, supply a lambda function that will just return None
|
||||
func = _archive_map.get(_type, lambda p, k: None)
|
||||
@@ -1672,6 +1678,15 @@ rec_types_B, fmt_B = list(zip(*rec_B_schema))
|
||||
rec_A_struct = struct.Struct('<' + ''.join(fmt_A))
|
||||
rec_B_struct = struct.Struct('<' + ''.join(fmt_B))
|
||||
|
||||
# These are extra sensors, not found on the Vues.
|
||||
extra_sensors = {
|
||||
'leafTemp1', 'leafTemp2', 'leafWet1', 'leafWet2',
|
||||
'soilTemp1', 'soilTemp2', 'soilTemp3', 'soilTemp4',
|
||||
'extraHumid1', 'extraHumid2', 'extraTemp1', 'extraTemp2', 'extraTemp3',
|
||||
'soilMoist1', 'soilMoist2', 'soildMoist3', 'soilMoist4'
|
||||
}
|
||||
|
||||
|
||||
def _rxcheck(model_type, interval, iss_id, number_of_wind_samples):
|
||||
"""Gives an estimate of the fraction of packets received.
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ WeeWX change history
|
||||
4.8.1 MM/DD/YYYY
|
||||
Don't swallow syntax errors when wee_config is looking for drivers.
|
||||
|
||||
Fix problem that create 'ghost' values for VantageVue stations.
|
||||
Fixes issue #771.
|
||||
|
||||
|
||||
4.8.0 04/21/2022
|
||||
Allow unit to be overridden for a specific plot by using new option 'unit'.
|
||||
|
||||
Reference in New Issue
Block a user