From 3eeba10b7ea092fb3cf199245e387dedcd6191b1 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 19 Aug 2024 15:57:38 -0400 Subject: [PATCH] use initial_duty_cycle --- CHANGELOG.md | 2 +- pioreactor/background_jobs/stirring.py | 2 ++ update_scripts/upcoming/update.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9126a14..c762b0e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - leader-only Pioreactors also have a `config_.local` file now. - a new top-level section in experiment profiles, `inputs`, allows you to define parameters that can be used in expressions. This is useful if you are copy the same constant over an over again, and want a quick way to change it once. Example: - ``` + ```yaml inputs: growth_phase_temp: 37.0 stationary_phase_temp: 30.0 diff --git a/pioreactor/background_jobs/stirring.py b/pioreactor/background_jobs/stirring.py index ae8fa986..d03432c4 100644 --- a/pioreactor/background_jobs/stirring.py +++ b/pioreactor/background_jobs/stirring.py @@ -240,6 +240,8 @@ def __init__( else: self.target_rpm = None + # initialize DC with initial_duty_cycle, however we can update it with a lookup (if it exists) + self.duty_cycle = config.getfloat("stirring.config", "initial_duty_cycle") self.rpm_to_dc_lookup = self.initialize_rpm_to_dc_lookup() self.duty_cycle = self.rpm_to_dc_lookup(self.target_rpm) diff --git a/update_scripts/upcoming/update.sh b/update_scripts/upcoming/update.sh index f1c090f8..232d87cf 100644 --- a/update_scripts/upcoming/update.sh +++ b/update_scripts/upcoming/update.sh @@ -91,5 +91,5 @@ sudo sed -i 's/create 0660 pioreactor pioreactor/create 0666 pioreactor pioreact # update firmware to 0.3 -sudo cp "$SCRIPT_DIR"/main.elf /usr/local/bin/main.elf +sudo cp "$SCRIPT_DIR"/main.elf /usr/local/bin/main.elf || sudo wget https://github.com/Pioreactor/pico-build/releases/download/0.3/main.elf -o /usr/local/bin/main.elf sudo systemctl restart load_rp2040.service || :