From ca88cb3085c4c680704bc4f692db9aa73bb248a0 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Wed, 6 Dec 2023 05:29:23 -0800 Subject: [PATCH] Correct the documentation of StdCalibrate --- docs_src/reference/weewx-options/stdcalibrate.md | 8 ++++---- src/weewx/engine.py | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs_src/reference/weewx-options/stdcalibrate.md b/docs_src/reference/weewx-options/stdcalibrate.md index 5eb58667..0abd1510 100644 --- a/docs_src/reference/weewx-options/stdcalibrate.md +++ b/docs_src/reference/weewx-options/stdcalibrate.md @@ -24,7 +24,7 @@ this: ```ini [StdCalibrate] [[Corrections]] - obs_type = expression[, loop][, record] + obs_type = expression[, loop][, archive] ``` Where: @@ -36,7 +36,7 @@ module](https://docs.python.org/3/library/math.html). More below. _`loop`_ is a directive that tells `StdCalibrate` to always apply the correction to LOOP packets. -_`record`_ is a directive that tells `StdCalibrate` to always apply the +_`archive`_ is a directive that tells `StdCalibrate` to always apply the correction to archive records. Details below. @@ -76,8 +76,8 @@ Here are examples: humidity = humidity - 3 # 1 outTemp = outTemp + 0.4, loop # 2 - barometer = barometer + .3, record # 3 - windSpeed = windSpeed * 1.05, loop, record # 4 + barometer = barometer + .3, archive # 3 + windSpeed = windSpeed * 1.05, loop, archive # 4 1. Apply the correction to all LOOP packets. Apply the correction to archive records only if they came from hardware. This is usually what you want. diff --git a/src/weewx/engine.py b/src/weewx/engine.py index 13bbe520..6543a8f4 100644 --- a/src/weewx/engine.py +++ b/src/weewx/engine.py @@ -432,7 +432,6 @@ class StdCalibrate(StdService): def new_loop_packet(self, event): """Apply a calibration correction to a LOOP packet""" for obs_type in self.corrections: - if obs_type == 'foo': continue # If no directives were specified (self.which is empty), then always do the correction. # If a directive has been specified, do the correction if 'loop' is in the directive. if len(self.which[obs_type]) == 0 or 'loop' in self.which[obs_type]: @@ -445,7 +444,6 @@ class StdCalibrate(StdService): def new_archive_record(self, event): """Apply a calibration correction to an archive packet""" for obs_type in self.corrections: - if obs_type == 'foo': continue # If a record was softwrae-generated, then the correction has presumably been # already applied in the LOOP packet. So, unless told otherwise, do not do the # correction again.