Skip to content

Commit

Permalink
log sensor state before measurement interval
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjaigner committed Oct 18, 2023
1 parent 7448a7b commit deb59d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sensor/src/procedures/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ def run(self) -> None:
f"starting calibration procedure at timestamp {calibration_time}",
config=self.config,
)
# clear ring buffer

# log the current CO2 sensor device info
self.logger.info(
f"GMP343 Sensor Info: {self.hardware_interface.co2_sensor.get_device_info()}"
)

# clear ring buffers
self.rb_humidity.clear()
self.rb_pressure.clear()

Expand Down
5 changes: 5 additions & 0 deletions sensor/src/procedures/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def run(self) -> None:
self.logger.info(f"starting 2 minute CO2 measurement interval")
measurement_procedure_start_time = time.time()

# log the current CO2 sensor device info
self.logger.info(
f"GMP343 Sensor Info: {self.hardware_interface.co2_sensor.get_device_info()}"
)

# do regular measurements for about 2 minutes
while True:
state = utils.StateInterface.read()
Expand Down

0 comments on commit deb59d0

Please sign in to comment.