ssec-jhu / evolver-ng

Next gen eVolver controller for bioreactor project - wip
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Consider adding an ``enable_read`` switch #199

Open jamienoss opened 3 days ago

jamienoss commented 3 days ago

Currently evolver.device.Evolver.loop_once does only the following: read, control, and commit. However, only control and commit are switchable. Perhaps read should also be?

def loop_once(self):
        self.read_state()
        # for any hardware awaiting calibration, call calibration update method here
        if self.enable_control:
            self.evaluate_controllers()
        if self.enable_commit:
            self.commit_proposals()

Relates to #194 #198 #196

It may then be useful to make the granularity of, e.g,. an abort optional, e.g.:

class Evolver(...):
  ...
  def abort(self, abort_read=True, abort_control=True, abort_commit=True):
    ...

Ideally, each of these defaults would be drawn from its param in evolver.settings.Settings.

There could also then be a drop-down option in the UI for these to be checked off when aborting.