makers-for-life / makair

🫁 The world's first open-source ventilator tested on human patients. Mass-producible at a low cost (~2000€).
Other
814 stars 78 forks source link

Software: implement alarms #107

Closed csommelet closed 4 years ago

csommelet commented 4 years ago

Alarms logic is currently missing.

Related issues describing alarms individually (alarms definition is still work in progress):

Alarming system behavior:

Test benches protocols: https://docs.google.com/document/d/1A3L-puGiDQOrkns229-GeCmOXisWVPol59NXHKI1Foo/edit

dsferruzza commented 4 years ago

I'll try to sum up my understanding.

Alarms have:

When an alarm is triggered it has effects depending on its severity:

When several alarms are triggered at the same time, only the alarms of the higher triggered severity have effects.

If a user press the alarm OFF button, it snoozes the buzzer for 2 minutes. If an alarm of higher severity is then triggered, snoozing is interrupted and buzzer rings.

If an alarm's predicate becomes false, it is not to be considered active anymore. Effects can continue to happen according to the higher severity of the remaining active alarms, or stop if there are no remaining active alarms.


I believe we need some kind of alarm controller (singleton?) that could:

It would then keep track and handle:

RomainBlanc commented 4 years ago

When an alarm is triggered, the alarms number will be displayed on the third line of the screen:

image

RomainBlanc commented 4 years ago

image French version

Mefl commented 4 years ago

due to #120, we need to store the cycle number for each alarm triggered to be able to send the new alarms (ie triggered in the last complete cycle)

hbs commented 4 years ago

Alarms should trigger telemetry events, so should the user actions.

And any parameter involved in an alarm should also be reported via the telemetry.