makers-for-life / makair-firmware

🧠 [Software] Firmware for the MakAir microcontroller. The brain of the ventilator.
Other
20 stars 11 forks source link

Prevent negative integral coefficient when peep > 15 cmH2O #51

Closed Benhalor closed 3 years ago

Benhalor commented 3 years ago

In pressure_controller.cpp line 1138 "coefficientI = ((-130 * ((int32_t)m_minPeepCommand)) / 50) + 380;"

When PEEP command is higher than 146 mmH2O, coefficientI is negative. It should not be

Benhalor commented 3 years ago

Problem fixed, tested and approuved