|
software:firmware
MakAir Firmware
|
Display and LCD screen related functions. More...
Go to the source code of this file.
Functions | |
| LiquidCrystal | screen (PIN_LCD_RS, PIN_LCD_RW, PIN_LCD_EN, PIN_LCD_D4, PIN_LCD_D5, PIN_LCD_D6, PIN_LCD_D7) |
| Instance of the screen controller. More... | |
| void | startScreen () |
| Start the screen. More... | |
| void | resetScreen () |
| Erase everything that is on the screen. More... | |
| void | displayCurrentVolume (int32_t volumeMassFlow, uint16_t cyclesPerMinute) |
| Display the current injected air volume. More... | |
| void | displayCurrentPressure (uint16_t pressure, uint16_t cyclesPerMinute) |
| Display the current step of the breathing. More... | |
| void | displayCurrentSettings (uint16_t peakPressureMax, uint16_t plateauPressureMax, uint16_t peepMin) |
| Display the current settings. More... | |
| void | displayCurrentInformation (uint16_t peakPressure, uint16_t plateauPressure, uint16_t peep) |
| Display relevant values from the ongoing cycle. More... | |
| static bool | hasAlarmInformationChanged (uint8_t p_alarmCodes[], uint8_t p_nbTriggeredAlarms) |
| Check whether triggered alarms are already displayed on screen or not. More... | |
| void | clearAlarmDisplayCache () |
| Force clear the alarm display cache. More... | |
| void | displayAlarmInformation (uint8_t p_alarmCodes[], uint8_t p_nbTriggeredAlarms) |
| Display triggered alarm codes. More... | |
| void | displayPressureOffset (int32_t p_inspiratoryPressureSensorOffset) |
| Display pressure offset. More... | |
| void | displayFlowMeterFail (int32_t p_flowMeterFlowAtStarting, int32_t p_flowMeterFlowWithBlowerOn) |
| Display error when flow meter fails. More... | |
| void | displayFlowMeterOffset (int32_t p_flowMeterFlowOffset) |
| Display flow meter offset. More... | |
| void | displayPressureOffsetUnstable (uint32_t p_minOffsetValue, uint32_t p_maxOffsetValue) |
| Display error when pressure offset is unstable. More... | |
| void | displayPatientMustBeUnplugged () |
| Display the "calibration in progress" message. More... | |
| void | displayEndOfLineTestMode () |
| Show that EOL mode was triggered. More... | |
| void | displayWatchdogError () |
| Display error when machine was restarted by watchdog. More... | |
| void | displayBatteryDeepDischarge () |
| Display error when battery level is too discharged. More... | |
| void | displayMachineStopped () |
| Display a message when the machine is stopped. More... | |
| uint16_t | convertAndRound (uint16_t pressure) |
| Convert and round a pressure value. More... | |
Variables | |
| static const uint8_t | MAX_ALARMS_DISPLAYED = 4 |
| Number of alarm codes to display on screen at most. More... | |
| static const char * | NO_ALARM_LINE = "PEAK PLAT PEEP " |
| Text to display at the third line of the screen when no alarm is triggered. More... | |
| static const char * | ALARM_LINE = "Alarm: " |
| Static label to display at the begining of the third line of the screen when at least one alarm is triggered. More... | |
| static const int | ALARMS_CODE_POS = 6 |
| Position of the first alarm code in the third line of the screen. More... | |
| static uint8_t | prevNbAlarmToPrint = 255 |
| static uint8_t | prevAlarmCodes [MAX_ALARMS_DISPLAYED] = {0} |
| static bool | clearCache = false |
Display and LCD screen related functions.
This relies on the LiquidCrystal library (https://github.com/arduino-libraries/LiquidCrystal). LCD screen must have 4 lines of 20 characters.
Definition in file screen.cpp.
| void clearAlarmDisplayCache | ( | ) |
| uint16_t convertAndRound | ( | uint16_t | pressure | ) |
Convert and round a pressure value.
| pressure | Pressure in mmH2O |
Definition at line 275 of file screen.cpp.
| void displayAlarmInformation | ( | uint8_t | p_alarmCodes[], |
| uint8_t | p_nbTriggeredAlarms | ||
| ) |
Display triggered alarm codes.
| p_alarmCodes | List of alarm codes to display |
| p_nbTriggeredAlarms | Number of triggered alarms |
Definition at line 146 of file screen.cpp.
| void displayBatteryDeepDischarge | ( | ) |
Display error when battery level is too discharged.
Definition at line 260 of file screen.cpp.
| void displayCurrentInformation | ( | uint16_t | peakPressure, |
| uint16_t | plateauPressure, | ||
| uint16_t | peep | ||
| ) |
Display relevant values from the ongoing cycle.
| peakPressure | The peak pressure [mmH2O] |
| plateauPressure | The plateau pressure [mmH2O] |
| peep | The Positive End Expiratory Pressure (PEEP) [mmH2O] |
Definition at line 91 of file screen.cpp.
| void displayCurrentPressure | ( | uint16_t | pressure, |
| uint16_t | cyclesPerMinute | ||
| ) |
Display the current step of the breathing.
| pressure | The current pressure [mmH2O] |
| cyclesPerMinute | Next desired number of cycles per minute |
Definition at line 65 of file screen.cpp.
| void displayCurrentSettings | ( | uint16_t | peakPressureMax, |
| uint16_t | plateauPressureMax, | ||
| uint16_t | peepMin | ||
| ) |
Display the current settings.
| peakPressureMax | PeakPressureMax [mmH2O] |
| plateauPressureMax | Next maximal plateau pressure [mmH2O] |
| peepMin | Next desired Positive End Expiratory Pressure (PEEP) [mmH2O] |
Definition at line 76 of file screen.cpp.
| void displayCurrentVolume | ( | int32_t | volumeMassFlow, |
| uint16_t | cyclesPerMinute | ||
| ) |
Display the current injected air volume.
| volumeMassFlow | The number of liter breathed in this cycle |
| cyclesPerMinute | Next desired number of cycles per minute |
Definition at line 53 of file screen.cpp.
| void displayEndOfLineTestMode | ( | ) |
Show that EOL mode was triggered.
Definition at line 245 of file screen.cpp.
| void displayFlowMeterFail | ( | int32_t | p_flowMeterFlowAtStarting, |
| int32_t | p_flowMeterFlowWithBlowerOn | ||
| ) |
Display error when flow meter fails.
| p_flowMeterFlowAtStarting | Measured flow offset value |
| p_flowMeterFlowWithBlowerOn | Maximum measured flow offset value |
Definition at line 194 of file screen.cpp.
| void displayFlowMeterOffset | ( | int32_t | p_flowMeterFlowOffset | ) |
Display flow meter offset.
| p_flowMeterFlowOffset | Measured flow offset value |
Definition at line 212 of file screen.cpp.
| void displayMachineStopped | ( | ) |
Display a message when the machine is stopped.
Definition at line 270 of file screen.cpp.
| void displayPatientMustBeUnplugged | ( | ) |
| void displayPressureOffset | ( | int32_t | p_inspiratoryPressureSensorOffset | ) |
Display pressure offset.
| p_inspiratoryPressureSensorOffset | Measured offset value |
Definition at line 186 of file screen.cpp.
| void displayPressureOffsetUnstable | ( | uint32_t | p_minOffsetValue, |
| uint32_t | p_maxOffsetValue | ||
| ) |
Display error when pressure offset is unstable.
| p_minOffsetValue | Minimum measured offset value |
| p_maxOffsetValue | Maximum measured offset value |
Definition at line 219 of file screen.cpp.
| void displayWatchdogError | ( | ) |
Display error when machine was restarted by watchdog.
Definition at line 250 of file screen.cpp.
|
static |
Check whether triggered alarms are already displayed on screen or not.
Definition at line 114 of file screen.cpp.
| void resetScreen | ( | ) |
| LiquidCrystal screen | ( | PIN_LCD_RS | , |
| PIN_LCD_RW | , | ||
| PIN_LCD_EN | , | ||
| PIN_LCD_D4 | , | ||
| PIN_LCD_D5 | , | ||
| PIN_LCD_D6 | , | ||
| PIN_LCD_D7 | |||
| ) |
Instance of the screen controller.
| void startScreen | ( | ) |
Start the screen.
Definition at line 42 of file screen.cpp.
|
static |
Static label to display at the begining of the third line of the screen when at least one alarm is triggered.
Definition at line 31 of file screen.cpp.
|
static |
Position of the first alarm code in the third line of the screen.
Definition at line 34 of file screen.cpp.
|
static |
Definition at line 111 of file screen.cpp.
|
static |
Number of alarm codes to display on screen at most.
Definition at line 24 of file screen.cpp.
|
static |
Text to display at the third line of the screen when no alarm is triggered.
Definition at line 27 of file screen.cpp.
|
static |
Definition at line 110 of file screen.cpp.
|
static |
Definition at line 109 of file screen.cpp.