software:firmware
MakAir Firmware
|
Handle control protocol on the serial input. More...
Go to the source code of this file.
Macros | |
#define | DISABLE_RPI_WATCHDOG 43690u |
Special value that can be used in a heartbeat control message to disable RPi watchdog. More... | |
Enumerations | |
enum | ControlSetting { Heartbeat = 0 , VentilationMode = 1 , PlateauPressure = 2 , PEEP = 3 , CyclesPerMinute = 4 , ExpiratoryTerm = 5 , TriggerEnabled = 6 , TriggerOffset = 7 , RespirationEnabled = 8 , AlarmSnooze = 9 , InspiratoryTriggerFlow = 10 , ExpiratoryTriggerFlow = 11 , TiMin = 12 , TiMax = 13 , LowInspiratoryMinuteVolumeAlarmThreshold = 14 , HighInspiratoryMinuteVolumeAlarmThreshold = 15 , LowExpiratoryMinuteVolumeAlarmThreshold = 16 , HighExpiratoryMinuteVolumeAlarmThreshold = 17 , LowRespiratoryRateAlarmThreshold = 18 , HighRespiratoryRateAlarmThreshold = 19 , TargetTidalVolume = 20 , LowTidalVolumeAlarmThreshold = 21 , HighTidalVolumeAlarmThreshold = 22 , PlateauDuration = 23 , LeakAlarmThreshold = 24 , TargetInspiratoryFlow = 25 , InspiratoryDuration = 26 , Locale = 27 , PatientHeight = 28 , PatientGender = 29 , PeakPressureAlarmThreshold = 30 , EolConfirm = 31 } |
Available settings in the control protocol. More... | |
Functions | |
void | serialControlLoop () |
Parse input and handle changes of settings. More... | |
Handle control protocol on the serial input.
Definition in file serial_control.h.
#define DISABLE_RPI_WATCHDOG 43690u |
Special value that can be used in a heartbeat control message to disable RPi watchdog.
Definition at line 11 of file serial_control.h.
enum ControlSetting |
Available settings in the control protocol.
Enumerator | |
---|---|
Heartbeat | Heartbeat used for the RPi watchdog feature (value is ignored except for the special value |
VentilationMode | Ventilation mode, must be one of the following:
|
PlateauPressure | Plateau pressure in mmH2O (value bounds must be between 100 and 400) |
PEEP | PEEP in mmH2O (value bounds must be between 0 and 300) |
CyclesPerMinute | Number of cycles per minute (value bounds must be between 5 and 35) |
ExpiratoryTerm | Expiration term in the "Inspiration/Expiration" ratio given that Inspiration = 10 (value bounds must be between 10 and 60) |
TriggerEnabled | State of the trigger (value must be 1 if enabled and 0 if disabled) |
TriggerOffset | Trigger offset in mmH2O (value bounds must be between 0 and 100) |
RespirationEnabled | State of the respiration (value must be 1 if enabled and 0 if disabled) |
AlarmSnooze | Alarm snooze (value must be 1 to snooze and 0 to unsnooze) |
InspiratoryTriggerFlow | Inspiratory trigger flow in percent. |
ExpiratoryTriggerFlow | Expiratory trigger flow in percent. |
TiMin | Minimum duration of inhalation in ms (value bounds must be between 100 and 3000) |
TiMax | Maximum duration of inhalation in ms (value bounds must be between 200 and 5000) |
LowInspiratoryMinuteVolumeAlarmThreshold | Threshold for low inspiratory minute volume alarm in L/min (value bounds must be between 0 and 20) |
HighInspiratoryMinuteVolumeAlarmThreshold | Threshold for high inspiratory minute volume alarm in L/min (value bounds must be between 10 and 40) |
LowExpiratoryMinuteVolumeAlarmThreshold | Threshold for low expiratory minute volume alarm in L/min (value bounds must be between 0 and 20) |
HighExpiratoryMinuteVolumeAlarmThreshold | Threshold for high expiratory minute volume alarm in L/min (value bounds must be between 10 and 40) |
LowRespiratoryRateAlarmThreshold | Threshold for low respiratory rate alarm in cycle per minute (value bounds must be between 5 and 25) |
HighRespiratoryRateAlarmThreshold | Threshold for high respiratory rate alarm in cycle per minute (value bounds must be between 15 and 35) |
TargetTidalVolume | Target tidal volume in mL (value bounds must be between 50 and 2000) |
LowTidalVolumeAlarmThreshold | Threshold for low tidal volume in mL (value bounds must be between 0 and 1000) |
HighTidalVolumeAlarmThreshold | Threshold for high tidal volume in mL (value bounds must be between 50 and 2000) |
PlateauDuration | Duration in ms of closing both valves to effectively measure plateau pressure in volume control modes (value bounds must be between 100 and 2000) |
LeakAlarmThreshold | Threshold for leak alarm in cL/min (value bounds must be between 0 and 10000) |
TargetInspiratoryFlow | Target flow during inspiration in L/min (value bounds must be between 5 and 80) |
InspiratoryDuration | Duration of inspiration in ms (value bounds must be between 200 and 3000) |
Locale | Language of the system; this should be two letters (see ISO 639-1) in ASCII representation as two u8. |
PatientHeight | Patient's height in centimeters. |
PatientGender | Patient's gender (0 = male, 1 = female) |
PeakPressureAlarmThreshold | Threshold for peak pressure alarm in mmH2O (value bounds must be between 50 and 700) |
EolConfirm | Confirm end-of-line test step (value bounds must be between 0 and 0) |
Definition at line 14 of file serial_control.h.
void serialControlLoop | ( | ) |
Parse input and handle changes of settings.
initTelemetry()
Definition at line 61 of file serial_control.cpp.