pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Should firmware `Sensor` drivers perform range-checking in the `measure` method? #422

Open ethanjli opened 2 years ago

ethanjli commented 2 years ago

Currently the SFM3019 Sensor class does not check its measured values against flow_min and flow_max in the measure method, only in the check_range method (which is part of the setup routine). I'm not sure whether we want measure to include range-checking, but we should be consistent across sensors (e.g. including the Honeywell ABP Sensor class). If we want to include range-checking in measure, then we will need to figure out how to handle such errors. We'll probably need to do some risk analysis (and/or look at what was identified and recorded in Matrix Requirements) to determine whether we do want range-checking in measure.

This issue was split off from https://github.com/pez-globo/pufferfish-software/pull/333#discussion_r670917951