Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: GHVentilator.h
- Revision:
- 5:da629056644f
- Parent:
- 4:de69851cf725
- Child:
- 6:b2672da545f1
diff -r de69851cf725 -r da629056644f GHVentilator.h --- a/GHVentilator.h Wed Apr 08 11:28:42 2020 +0000 +++ b/GHVentilator.h Wed Apr 08 12:36:36 2020 +0000 @@ -18,8 +18,6 @@ enum { ChannelCountMax = 4, - StateCalibratingPressureSensor = 0, - StateRunning = 1, }; // The tick and negative calibrating positive running states. @@ -37,7 +35,8 @@ float Pressure, //< The Pressure in the tank. PressureMin, //< The min Pressure. PressureMax, //< The max Pressure. - PressureHysteresis; //< The percent hystersis for the Pressure chamber. + HysteresisChamber, //< The pressure chamber hystersis +/- percent. + HysteresisPatient; //< The patient Hystersis percent muliplier. DigitalOut Blower; //< A blower powered by a Solid State Relay. DigitalOut Status; //< Status pin for outputing the Device status. Ticker UpdateTicker; //< The x times per second update ticker. @@ -46,12 +45,14 @@ GHVentilator (int TicksPerSecond, int TicksCalibration, I2C& AtmosphereBus, char AtmosphereAddress, float PressureHysteresis, + float HysteresisPatient, PinName BlowerPin, PinName StatusPin, GHVentilatorChannel* A); /* Constructs a GHV with 2 channels. */ GHVentilator (int TicksPerSecond, int TicksCalibration, I2C& AtmosphereBus, char AtmosphereAddress, + float HysteresisChamber, float PressureHysteresis, PinName BlowerPin, PinName StatusPin, GHVentilatorChannel* A, @@ -61,6 +62,7 @@ GHVentilator (int TicksPerSecond, int TicksCalibration, I2C& AtmosphereBus, char AtmosphereAddress, float PressureHysteresis, + float HysteresisPatient, PinName BlowerPin, PinName StatusPin, GHVentilatorChannel* A, GHVentilatorChannel* B, @@ -70,6 +72,7 @@ GHVentilator (int TicksPerSecond, int TicksCalibration, I2C& AtmosphereBus, char AtmosphereAddress, float PressureHysteresis, + float HysteresisPatient, PinName BlowerPin, PinName StatusPin, GHVentilatorChannel* A, GHVentilatorChannel* B, @@ -81,7 +84,7 @@ GHVentilatorChannel* Channel(int Index); /* Reads the Atmospher.Pressure() and Atmospher.Temperature () */ - void TarePressure(); + void Tare(); /* Sets the inhale and exhale ticks for the give channel Index. */ int TicksInhaleExhaleSet (int Index, int TicksInhale, int TicksExhale);