pez-globo / pufferfish-software

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

Generate alarms in firmware for sensor disconnection and low battery power #402

Closed rohanpurohit closed 3 years ago

rohanpurohit commented 3 years ago

This PR adds:

rohanpurohit commented 3 years ago

Observations from testing:

lgtm-com[bot] commented 3 years ago

This pull request introduces 1 alert when merging 1ac2f717a60c9217104b55a26ea3f62ad63cb8bb into aff9ab0865d6cf0218e539c8dffc6d8ab0832432 - view on LGTM.com

new alerts:

ethanjli commented 3 years ago

The battery alarms look good in testing, for both the firmware and the backend. Right now our implementation assumes that activation of a new alarm event will not cause alarms to be automatically unmuted - I believe that's what we decided to do, so this assumption is reasonable. If one day we decide to make generation of a new alarm event automatically unmute alarms, then when we're charging the battery from wall power and it goes from 5% to 6%, alarms will be unmuted - which is undesirable. I don't think we need to worry about this.

For how the frontend displays the sensor disconnection events, I'd suggest that the event text should be "Internal sensor failed", and then the Details text should say which sensor was lost, e.g. "O2 sensor connection lost". Otherwise, everything looks good to merge. For records-keeping:

  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too?
  2. Were any of these contributions also part of work you did for an employer or a client?
  3. Does this work include, or is it based on, any third-party work which you did not create?
rohanpurohit commented 3 years ago

Added change for label and detail

  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes.
  2. Were any of these contributions also part of work you did for an employer or a client? No.
  3. Does this work include, or is it based on, any third-party work which you did not create? No.