Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HEV - High Energy Ventilator
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
HEV - High Energy Ventilator
Commits
5eec7900
Commit
5eec7900
authored
4 years ago
by
Dónal Murray
Browse files
Options
Downloads
Patches
Plain Diff
Add alarm codes to enum in both C++ and python commsConstants files
parent
0556faa1
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arduino/common/lib/commsControl/commsConstants.h
+28
-1
28 additions, 1 deletion
arduino/common/lib/commsControl/commsConstants.h
raspberry-dataserver/commsConstants.py
+27
-3
27 additions, 3 deletions
raspberry-dataserver/commsConstants.py
with
55 additions
and
4 deletions
arduino/common/lib/commsControl/commsConstants.h
+
28
−
1
View file @
5eec7900
...
...
@@ -31,11 +31,38 @@
#define PACKET_DATA 0x40
#define PACKET_SET 0x20 //set vs get ?
#define HEV_FORMAT_VERSION 0xA
0
#define HEV_FORMAT_VERSION 0xA
1
enum
command_codes
{
CMD_START
=
1
,
CMD_STOP
=
2
};
// Taken from safety doc. Correct as of 1400 on 20200416
enum
alarm_codes
{
APNEA
=
1
,
// HP
CHECK_VALVE_EXHALE
=
2
,
// HP
CHECK_P_PATIENT
=
3
,
// HP
EXPIRATION_SENSE_FAULT_OR_LEAK
=
4
,
// MP
EXPIRATION_VALVE_Leak
=
5
,
// MP
HIGH_FIO2
=
6
,
// MP
HIGH_PRESSURE
=
7
,
// HP
HIGH_RR
=
8
,
// MP
HIGH_VTE
=
9
,
// MP
LOW_VTE
=
10
,
// MP
HIGH_VTI
=
11
,
// MP
LOW_VTI
=
12
,
// MP
INTENTIONAL_STOP
=
13
,
// HP
LOW_BATTERY
=
14
,
// HP (LP) if AC power isn't (is) connected
LOW_FIO2
=
15
,
// HP
OCCLUSION
=
16
,
// HP
HIGH_PEEP
=
17
,
// HP
LOW_PEEP
=
18
,
// HP
AC_POWER_DISCONNECTION
=
19
,
// MP
BATTERY_FAULT_SRVC
=
20
,
// MP
BATTERY_CHARGE
=
21
,
// MP
AIR_FAIL
=
22
,
// HP
O2_FAIL
=
23
,
// HP
PRESSURE_SENSOR_FAULT
=
24
,
// HP
ARDUINO_FAIL
=
25
};
// HP
// struct for all data sent
struct
dataFormat
{
uint8_t
version
=
HEV_FORMAT_VERSION
;
//
...
...
This diff is collapsed.
Click to expand it.
raspberry-dataserver/commsConstants.py
+
27
−
3
View file @
5eec7900
...
...
@@ -17,7 +17,7 @@ class payloadType(Enum):
class
BaseFormat
():
def
__init__
(
self
):
self
.
_RPI_VERSION
=
0xA
0
self
.
_RPI_VERSION
=
0xA
1
self
.
_byteArray
=
None
self
.
_type
=
payloadType
.
payloadUnset
self
.
_version
=
0
...
...
@@ -289,5 +289,29 @@ class alarmFormat(BaseFormat):
@unique
class
alarm_codes
(
Enum
):
ALARM_START
=
1
ALARM_STOP
=
2
\ No newline at end of file
# Taken from safety doc. Correct as of 1400 on 20200416
APNEA
=
1
# HP
CHECK_VALVE_EXHALE
=
2
# HP
CHECK_P_PATIENT
=
3
# HP
EXPIRATION_SENSE_FAULT_OR_LEAK
=
4
# MP
EXPIRATION_VALVE_Leak
=
5
# MP
HIGH_FIO2
=
6
# MP
HIGH_PRESSURE
=
7
# HP
HIGH_RR
=
8
# MP
HIGH_VTE
=
9
# MP
LOW_VTE
=
10
# MP
HIGH_VTI
=
11
# MP
LOW_VTI
=
12
# MP
INTENTIONAL_STOP
=
13
# HP
LOW_BATTERY
=
14
# HP (LP) if AC power isn't (is) connected
LOW_FIO2
=
15
# HP
OCCLUSION
=
16
# HP
HIGH_PEEP
=
17
# HP
LOW_PEEP
=
18
# HP
AC_POWER_DISCONNECTION
=
19
# MP
BATTERY_FAULT_SRVC
=
20
# MP
BATTERY_CHARGE
=
21
# MP
AIR_FAIL
=
22
# HP
O2_FAIL
=
23
# HP
PRESSURE_SENSOR_FAULT
=
24
# HP
ARDUINO_FAIL
=
25
# HP
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment