software:firmware
MakAir Firmware
screen.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 // INCLUDES ===================================================================
14 
15 // External
16 #include <LiquidCrystal.h>
17 
18 // Internal
19 #include "../includes/parameters.h"
20 
21 // INITIALISATION =============================================================
22 
24 extern LiquidCrystal screen;
25 
26 // FUNCTIONS ==================================================================
27 
33 void startScreen();
34 
36 void resetScreen();
37 
44 void displayCurrentPressure(uint16_t pressure, uint16_t cyclesPerMinute);
45 
52 void displayCurrentVolume(int32_t volumeMassFlow, uint16_t cyclesPerMinute);
53 
61 void displayCurrentSettings(uint16_t peakPressureMax,
62  uint16_t plateauPressureMax,
63  uint16_t peepMin);
64 
72 void displayCurrentInformation(uint16_t peakPressure, uint16_t plateauPressure, uint16_t peep);
73 
80 void displayAlarmInformation(uint8_t p_alarmCodes[], uint8_t p_nbTriggeredAlarms);
81 
88 void displayPressureOffsetUnstable(uint32_t p_minOffsetValue, uint32_t p_maxOffsetValue);
89 
95 void displayPressureOffset(int32_t p_inspiratoryPressureSensorOffset);
96 
103 void displayFlowMeterFail(int32_t p_flowMeterFlowAtStarting, int32_t p_flowMeterFlowWithBlowerOn);
104 
110 void displayFlowMeterOffset(int32_t p_flowMeterFlowOffset);
111 
114 
117 
120 
122 void displayWatchdogError();
123 
127 void displayMachineStopped();
128 
131 
138 uint16_t convertAndRound(uint16_t pressure);
void displayAlarmInformation(uint8_t p_alarmCodes[], uint8_t p_nbTriggeredAlarms)
Display triggered alarm codes.
Definition: screen.cpp:146
void displayBatteryDeepDischarge()
Display error when battery level is too discharged.
Definition: screen.cpp:260
void displayMachineStopped()
Display a message when the machine is stopped.
Definition: screen.cpp:270
void displayWatchdogError()
Display error when machine was restarted by watchdog.
Definition: screen.cpp:250
uint16_t convertAndRound(uint16_t pressure)
Convert and round a pressure value.
Definition: screen.cpp:275
void displayPressureOffsetUnstable(uint32_t p_minOffsetValue, uint32_t p_maxOffsetValue)
Display error when pressure offset is unstable.
Definition: screen.cpp:219
void displayCurrentSettings(uint16_t peakPressureMax, uint16_t plateauPressureMax, uint16_t peepMin)
Display the current settings.
Definition: screen.cpp:76
void displayFlowMeterOffset(int32_t p_flowMeterFlowOffset)
Display flow meter offset.
Definition: screen.cpp:212
void clearAlarmDisplayCache()
Force clear the alarm display cache.
Definition: screen.cpp:144
void displayEndOfLineTestMode()
Show that EOL mode was triggered.
Definition: screen.cpp:245
void displayPressureOffset(int32_t p_inspiratoryPressureSensorOffset)
Display pressure offset.
Definition: screen.cpp:186
void displayPatientMustBeUnplugged()
Display the "calibration in progress" message.
Definition: screen.cpp:236
void displayCurrentPressure(uint16_t pressure, uint16_t cyclesPerMinute)
Display the current step of the breathing.
Definition: screen.cpp:65
LiquidCrystal screen
Instance of the screen controller.
void displayCurrentVolume(int32_t volumeMassFlow, uint16_t cyclesPerMinute)
Display the current injected air volume.
Definition: screen.cpp:53
void resetScreen()
Erase everything that is on the screen.
Definition: screen.cpp:50
void startScreen()
Start the screen.
Definition: screen.cpp:42
void displayFlowMeterFail(int32_t p_flowMeterFlowAtStarting, int32_t p_flowMeterFlowWithBlowerOn)
Display error when flow meter fails.
Definition: screen.cpp:194
void displayCurrentInformation(uint16_t peakPressure, uint16_t plateauPressure, uint16_t peep)
Display relevant values from the ongoing cycle.
Definition: screen.cpp:91