makers-for-life / makair-control-ui

🖥 [Software] GUI application that uses the telemetry protocol to control the ventilator.
Other
22 stars 11 forks source link

Move graph saturation detector to a sliding register of highest + lowest pressure & flow values in the chip module (~0.5% CPU load at 30 FPS) #68

Closed valeriansaliou closed 3 years ago

valeriansaliou commented 3 years ago

This prevents each redraw to loop through all points to find the lowest/highest values. This should save some CPU cycles.

valeriansaliou commented 3 years ago

This should be implemented w/ the following algorithm:

On the drawer loop side: