Initialization of calibration process.
62 int32_t inspiratoryPressureSensorOffset = 0;
65 inspiratoryPressureSensorOffset =
68 inspiratoryPressureSensorOffset = 0;
98 #ifdef MASS_FLOW_METER_ENABLED
102 int32_t flowMeterFlowAtStarting = 0;
111 #ifdef MASS_FLOW_METER_ENABLED
114 int32_t flowMeterFlowWithBlowerOn = 30000;
120 bool isMassFlowMeterOutOfRange = ((flowMeterFlowAtStarting < -1000)
121 || (flowMeterFlowAtStarting > 1000));
123 if ((isMassFlowMeterOutOfRange ==
true)
124 || ((flowMeterFlowWithBlowerOn < 20000) || (flowMeterFlowWithBlowerOn > 100000))) {
140 if (isMassFlowMeterOutOfRange ==
true) {
147 flowMeterFlowAtStarting,
148 flowMeterFlowWithBlowerOn);
160 #ifdef MASS_FLOW_METER_ENABLED
void Buzzer_High_Prio_Start(void)
Activate the buzzer pattern for high priority alarms.
void Buzzer_Boot_Start(void)
Activate boot bip.
void Calibration_Wait_Measure_Pressure(uint16_t ms)
Block execution for a given duration.
uint32_t pressureOffsetCount
uint32_t restartWaitTimer
#define RESTART_READ_KEYBOARD_DELAY
void Calibration_Read_Keyboard_Delayed()
Read keyboard duing calibration process (delayed)
int32_t pressureOffsetSum
void stop()
Stops the blower.
void runSpeed(uint16_t p_runSpeed)
Run the blower to a given speed.
void setPressureSensorOffset(int32_t p_pressureSensorOffest)
Set the pressure sensor offset.
void execute()
Command the valve to go to the requested aperture.
void open()
Request opening of the Pressure Valve.
int32_t MFM_getOffset(void)
Get massflow meter offset.
int8_t MFM_calibrateZero(void)
If the massflow meter needs to be calibrated, this function will be usefull.
int32_t MFM_read_airflow(void)
Read instant air flow.
#define LED_START_INACTIVE
#define DEFAULT_BLOWER_SPEED
#define LED_YELLOW_INACTIVE
#define LED_GREEN_INACTIVE
#define LED_YELLOW_ACTIVE
#define MAX_PRESSURE_OFFSET
PressureSensor inspiratoryPressureSensor
PressureValve inspiratoryValve
PressureValve expiratoryValve
void displayPressureOffsetUnstable(uint32_t p_minOffsetValue, uint32_t p_maxOffsetValue)
Display error when pressure offset is unstable.
void displayFlowMeterOffset(int32_t p_flowMeterFlowOffset)
Display flow meter offset.
void displayPressureOffset(int32_t p_inspiratoryPressureSensorOffset)
Display pressure offset.
void displayPatientMustBeUnplugged()
Display the "calibration in progress" message.
void resetScreen()
Erase everything that is on the screen.
void displayFlowMeterFail(int32_t p_flowMeterFlowAtStarting, int32_t p_flowMeterFlowWithBlowerOn)
Display error when flow meter fails.
void sendMassFlowMeterFatalError(void)
Send a "mass flow meter" fatal error.
void sendCalibrationFatalError(int16_t pressureOffsetValue, int16_t minPressureValue, int16_t maxPressureValue, int16_t flowAtStartingValue, int16_t flowWithBlowerOnValue)
void sendInconsistentPressureFatalError(uint16_t pressureValue)