mirror of
https://github.com/weewx/weewx.git
synced 2026-05-24 17:55:15 -04:00
Correct the documentation of StdCalibrate
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user