Pioreactor / pioreactor

Hardware and software for accessible, extensible, and scalable bioreactors. Built on Raspberry Pi.
https://pioreactor.com
MIT License
101 stars 9 forks source link

Allow a "break" directive #471

Closed CamDavidsonPilon closed 5 months ago

CamDavidsonPilon commented 9 months ago

It's awkward to write a profile like: "change temperature the first time X happens". What if actions in the repeat block can have an optional break directive, which will exit any top-level repeat if the action executes?

type: repeat
while: ....
actions:
  - type: update
    if: ...
    break: True # maybe an expression??
    options:
        ...

This would require us to keep track of future actions, so we can cancel them...

CamDavidsonPilon commented 5 months ago

Solved with a when type