OVVE / software-controller

Software for the Arduino Mega
Other
2 stars 7 forks source link

Pressure Sensor Alarm Fix #57

Closed mrrosen closed 4 years ago

mrrosen commented 4 years ago

Implement averaged pressure sensor alarm for high and low; using a window of pressure values over a period of time (150 msec)

mrrosen commented 4 years ago

@arbarkan Please look over the small changes I made to your implementation; if they look good we can merge them in (note, the only thing I really changed was making the accumulator bigger since int16_t could overflow with high pressure; say a constant pressure of 40 [cmH2O] = 4000 [0.1 mmH2O], 150 [ms] / 10 [ms] = 15, 4000*15 = 60000, overflow for int16_t)