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

Add temp sensor and serial device test suite #89

Closed amitschang closed 2 months ago

amitschang commented 2 months ago

This change adds the temperature sensor, adds re-usable test suites for hardware that operate via the evolver serial connection, and refactors the OD test to use the new suite.

one more step of the way on: https://github.com/ssec-jhu/evolver-ng/issues/22 resolves: https://github.com/ssec-jhu/evolver-ng/issues/84

this also backports change excluding test from build (https://github.com/ssec-jhu/base-template/pull/138)


The temp sensor is both sensor (upon read, getting ADC values) and effector (when issuing the read command, PWM duty cycle are set from the input values). No calibration is done at the moment, only raw values stored and set, future change will handle calibration.

This has been evaluated also on the evolver box, installing this PR change and using the following evolver.yml:

vials:
- 0
- 5
- 10
- 15
hardware:
  temp:
    classinfo: evolver.hardware.standard.temperature.Temperature
    config:
      addr: temp
      vials: [0, 5, 10, 15]

here is a plot of temp history from this sensor:

image

amitschang commented 2 months ago

@jamienoss, thanks for the review! I've made some updates and I think addressed the comments, let me know. I've also included a change which I earlier failed to push, it filters vials from proposal earlier so they don't inadvertently end up in committed and fix to test against the committed (line 43 of temperature, and 109-110 of test_utils)