Skip to content

Commit

Permalink
fix updating rpm not using calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 10, 2025
1 parent 1792dee commit 15f1d35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pioreactor/background_jobs/stirring.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ def set_target_rpm(self, value: float) -> None:
raise ValueError("Can't set target RPM when no RPM measurement is being made")

self.target_rpm = clamp(0.0, float(value), 5_000.0)
self.set_duty_cycle(self.rpm_to_dc_lookup(self.target_rpm))
self._estimate_duty_cycle = self.rpm_to_dc_lookup(self.target_rpm)
self.set_duty_cycle(self._estimate_duty_cycle)
self.pid.set_setpoint(self.target_rpm)

def sleep_if_ready(self, seconds):
Expand Down

0 comments on commit 15f1d35

Please sign in to comment.