Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Nov 29, 2024
1 parent 31e1a3e commit 0ef1317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pioreactor/background_jobs/stirring.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def __init__(
experiment=self.experiment,
pubsub_client=self.pub_client,
)
self.pwm.start(0)
self.pwm.lock()
self.duty_cycle_lock = Lock()

Expand Down Expand Up @@ -291,8 +292,7 @@ def action_to_do_after_od_reading(self):
# self.poll_and_update_dc()

def initialize_dodging_operation(self):
self._estimate_duty_cycle = 0
self.set_duty_cycle(self._estimate_duty_cycle)
self.set_duty_cycle(0)
self.rpm_check_repeated_thread = RepeatedTimer(
1_000,
lambda *args: None,
Expand Down Expand Up @@ -349,7 +349,7 @@ def on_disconnected(self) -> None:
self.rpm_calculator.clean_up()

def start_stirring(self) -> None:
self.pwm.start(100) # get momentum to start
self.set_duty_cycle(100) # get momentum to start
sleep(0.35)
self.set_duty_cycle(self._estimate_duty_cycle)

Expand Down

0 comments on commit 0ef1317

Please sign in to comment.