Skip to content

Commit

Permalink
Add bag calibration for AMBU adult bag
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyort committed Apr 1, 2020
1 parent 417b4ea commit 068096e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e-vent.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ float IE_MAX = 4;
float VOL_MIN = 100;
float VOL_MAX = 700; // 900; // For full

// Bag Calibration for AMBU Adult bag
float VOL_SLOPE = 9.39;
float VOL_INT = -202.2;

//Setup States
States state;
bool enteringState;
Expand Down Expand Up @@ -102,7 +106,7 @@ void readPots(){
Tex = period - Tin;
Vin = Volume/Tin; // Velocity in clicks/s

displ.writeVolume(map(Volume, VOL_MIN, VOL_MAX, 0, 100));
displ.writeVolume(max(0,map(Volume, VOL_MIN, VOL_MAX, 0, 100) * VOL_SLOPE + VOL_INT));
displ.writeBPM(bpm);
displ.writeIEratio(ie);
if(DEBUG){
Expand Down

0 comments on commit 068096e

Please sign in to comment.