Skip to content

Commit

Permalink
use initial_duty_cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Aug 19, 2024
1 parent f515bbd commit 3eeba10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- leader-only Pioreactors also have a `config_<hostname>.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
Expand Down
2 changes: 2 additions & 0 deletions pioreactor/background_jobs/stirring.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion update_scripts/upcoming/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :

0 comments on commit 3eeba10

Please sign in to comment.