ssec-jhu / evolver-ng

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

vials do not get list from evolver by default #90

Open amitschang opened 4 weeks ago

amitschang commented 4 weeks ago

When testing on the evolver box, I started with this config:

vials:
- 0
- 5
- 10
- 15
hardware:
  od:
    classinfo: evolver.hardware.standard.od_sensor.ODSensor
    config:
      addr: od_90
  temp:
    classinfo: evolver.hardware.standard.temperature.Temperature
    config:
      addr: temp

and was expecting (hoping, maybe) that the vials list for sensors would be that of top-level evolver, however inspected state revealed all 16 vials. This could be corrected by specifying the vials in the config section of each hardware (as below), but this seems confusing and redundant.

Marking this as a bug since I think the desired behavior with the above config is to carry over the top-level vials by default.


Appendix:

This config produces desired result:

vials:
- 0
- 5
- 10
- 15
hardware:
  od:
    classinfo: evolver.hardware.standard.od_sensor.ODSensor
    config:
      addr: od_90
      vials: [0, 5, 10, 15]
  temp:
    classinfo: evolver.hardware.standard.temperature.Temperature
    config:
      addr: temp
      vials: [0, 5, 10, 15]
jamienoss commented 3 weeks ago

This is related to https://github.com/ssec-jhu/evolver-ng/issues/85#issuecomment-2159217228

The crux is that there's a config collision between Evolver.Config.hardware and Evolver.Config.controllers.config.

...and the conversation we had offline in regard to there currently being no functionality in Evolver to act as a manager to determine the config defaults or precedence when it's responsible for instantiating hardware, or any similar object with a Config.