pez-globo / pufferfish-software

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

Fix bug where the error integral was always set to max value #225

Closed ethanjli closed 4 years ago

ethanjli commented 4 years ago

This PR:

ethanjli commented 4 years ago

@Tanmay06 Can you try that test where we tried to do with FiO2 setting of 21% and flow rate setting of 60 L/min and had wall air input pressure too low to be able to achieve 60 L/min and then made some other adjustment which caused an overshoot in the flow rate, and see if we still get the same problem in this PR?

This PR is in the critical path of development, passes clang-tidy and clang-format checks, is needed to support hardware bring-up at Bharat Forge, is of at least comparable quality to the rest of the firmware codebase, and is a bugfix. I will merge in this PR after the Bharat Forge team tests this and confirms that it fixes the problem we observed, but before a full code review is completed.

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? 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
Tanmay06 commented 4 years ago

This PR works as expected. When I tried with FiO2 setting of 21% and flow rate setting of 60 L/min and the wall air input pressure was not enough for the 60 L/min and then increased the FiO2 to 60% / 100%, the flow rate didn't shoot up as it used to do before. I tested this even with the O2 input and it works fine.