pez-globo / pufferfish-software

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

Debounce firmware alarms #322

Closed ethanjli closed 3 years ago

ethanjli commented 3 years ago

Currently, if a measurement jumps around an alarm limit (even if it's within what the frontend will smooth/round/truncate away), it produces many alarm events. Obviously this is undesirable. In the firmware we need signal smoothing of values for alarms, as well as rounding for alarms, so that the frontend's displayed value is consistent with the alarm activation/inactivation behavior, in edge cases where roundoff makes a difference. This may be enough to fully debounce firmware alarms, or it may not; I suspect we might need a separate debouncing mechanism anyways, for events where we don't have a floating-point number to smooth.

This debouncing mechanism needs to support a "lockout" for FiO2 and flow rate (whose alarm limits should be automatically adjusted when FiO2 and flow rate settings are adjusted, as described in #323), where alarms don't trigger during an initial period in which the ventilator expects those measurements to still be transitioning to their new settings. However, the alarms do need to sound if the measurements can't reach their new settings within a reasonable amount of time.