Skip to content

Commit

Permalink
fix #162
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjaigner committed Feb 20, 2024
1 parent 1c63fbc commit e4c8d99
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sensor/src/procedures/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def _alternate_bottle_for_drying(self) -> list[custom_types.CalibrationGasConfig
utils.StateInterface.write(state)

# update sequence

# 2 calibration cylinders
if len(self.config.calibration.gas_cylinders) == 2:
if current_position == 0:
return self.config.calibration.gas_cylinders
Expand All @@ -79,6 +81,7 @@ def _alternate_bottle_for_drying(self) -> list[custom_types.CalibrationGasConfig
self.config.calibration.gas_cylinders[0],
]

# 3 calibration cylinders
if len(self.config.calibration.gas_cylinders) == 3:
if current_position == 0:
return self.config.calibration.gas_cylinders
Expand All @@ -95,6 +98,9 @@ def _alternate_bottle_for_drying(self) -> list[custom_types.CalibrationGasConfig
self.config.calibration.gas_cylinders[0],
]

# 1 or 4+ calibration cylinders
return self.config.calibration.gas_cylinders

def run(self) -> None:
state = utils.StateInterface.read()
calibration_time = datetime.utcnow().timestamp()
Expand Down

0 comments on commit e4c8d99

Please sign in to comment.