Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HEV - High Energy Ventilator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
HEV - High Energy Ventilator
Commits
ee0dc4b3
Commit
ee0dc4b3
authored
Oct 27, 2021
by
Tim Powell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-ui-uart-packets' into 'release/ui'
Fix ui uart packets See merge request
!15
parents
3883548a
8ee357ee
Pipeline
#2815
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
14 deletions
+45
-14
CommsCommon.py
raspberry-dataserver/CommsCommon.py
+39
-12
CommsDebug2.py
raspberry-dataserver/CommsDebug2.py
+3
-1
stop.py
raspberry-dataserver/stop.py
+3
-1
No files found.
raspberry-dataserver/CommsCommon.py
View file @
ee0dc4b3
...
...
@@ -61,12 +61,11 @@ class CMD_TYPE(Enum):
GET_THRESHOLD_MIN
=
16
GET_THRESHOLD_MAX
=
17
TEST_AUDIO_ALARM
=
18
SKIP_NEXT_CALIBRATION
=
19
DO_CALIBRATION
=
20
MUTE_ALARM
=
21
RESET_ALARM
=
22
SET_VOLUME
=
23
GET_EXPERT_INFO
=
24
DO_CALIBRATION
=
19
MUTE_ALARM
=
20
RESET_ALARM
=
21
SET_VOLUME
=
22
GET_EXPERT_INFO
=
23
...
...
@@ -217,7 +216,22 @@ class ALARM_CODES(Enum):
HIGH_VMI
=
29
# MP
LOW_VMI
=
30
# MP
EXTENDED_HIGH_PRESSURE
=
31
# HP
ALARMS_COUNT
=
32
AIR_SUPPLY_PRESSURE_READING_FAILURE
=
32
# FP
AIR_REGULATED_PRESSURE_READING_FAILURE
=
33
# FP
O2_SUPPLY_PRESSURE_READING_FAILURE
=
34
# FP
O2_REGULATED_PRESSURE_READING_FAILURE
=
35
# FP
BUFFER_PRESSURE_READING_FAILURE
=
36
# FP
INHALE_PRESSURE_READING_FAILURE
=
37
# FP
PATIENT_PRESSURE_READING_FAILURE
=
38
# FP
BUFFER_TEMPERATURE_READING_FAILURE
=
39
# FP
PATIENT_PRESSURE_DIFF_READING_FAILURE
=
40
# FP
O2_PERCENT_READING_FAILURE
=
41
# FP
OPERATIONAL_TIME_EXCEEDED
=
42
# LP
CASE_TEMPERATURE_OVERHEAT
=
43
# LP
ALARMS_COUNT
=
44
...
...
@@ -321,6 +335,7 @@ class PayloadFormat:
13
:
PersonalFormat
,
14
:
AlarmMuteFormat
,
15
:
BadThresholdFormat
,
16
:
ExpertInfoFormat
}
ReturnType
=
DATA_TYPE_TO_CLASS
[
rec_bytes
[
5
]]
payload_obj
=
ReturnType
()
...
...
@@ -447,11 +462,17 @@ class DataFormat(PayloadFormat):
# =======================================
@
dataclass
class
ReadbackFormat
(
PayloadFormat
):
_dataStruct
=
Struct
(
"<BIBHHHHHHHHHH
ff
BBBBBBBBBBBffffffB"
)
_dataStruct
=
Struct
(
"<BIBHHHHHHHHHH
HHHHHBB
BBBBBBBBBBBffffffB"
)
payload_type
:
PAYLOAD_TYPE
=
PAYLOAD_TYPE
.
READBACK
duration_pre_calibration
:
int
=
0
duration_calibration
:
int
=
0
#duration_calibration: int = 0
duration_calibration_first_reading
=
0
duration_calibration_pressurise_all
=
0
duration_calibration_pressurise_o2
=
0
duration_calibration_pressurise_purge
=
0
duration_calibration_pressurise_stabilise
=
0
duration_calibration_second_reading
=
0
duration_buff_purge
:
int
=
0
duration_buff_flush
:
int
=
0
duration_buff_prefill
:
int
=
0
...
...
@@ -461,8 +482,8 @@ class ReadbackFormat(PayloadFormat):
duration_pause
:
int
=
0
duration_exhale
:
int
=
0
valve_air_in
:
float
=
0.
0
valve_o2_in
:
float
=
0.
0
valve_air_in
:
int
=
0
valve_o2_in
:
int
=
0
valve_inhale
:
int
=
0
valve_exhale
:
int
=
0
valve_purge
:
int
=
0
...
...
@@ -494,7 +515,13 @@ class ReadbackFormat(PayloadFormat):
self
.
version
,
self
.
timestamp
,
tmp_payload_type
,
self
.
duration_pre_calibration
,
#self.duration_pre_calibration,
self
.
duration_calibration_first_reading
,
self
.
duration_calibration_pressurise_all
,
self
.
duration_calibration_pressurise_o2
,
self
.
duration_calibration_pressurise_purge
,
self
.
duration_calibration_pressurise_stabilise
,
self
.
duration_calibration_second_reading
,
self
.
duration_calibration
,
self
.
duration_buff_purge
,
self
.
duration_buff_flush
,
...
...
raspberry-dataserver/CommsDebug2.py
View file @
ee0dc4b3
...
...
@@ -43,7 +43,9 @@ def getTTYPort():
port_device
=
port
.
device
elif
vidpid
==
"10C4:EA60"
:
port_device
=
port
.
device
elif
len
(
sys
.
argv
)
>
1
:
if
port_device
==
""
:
if
len
(
sys
.
argv
)
>
1
:
port_device
=
sys
.
argv
[
1
]
return
port_device
...
...
raspberry-dataserver/stop.py
View file @
ee0dc4b3
...
...
@@ -43,7 +43,9 @@ def getTTYPort():
port_device
=
port
.
device
elif
vidpid
==
"10C4:EA60"
:
port_device
=
port
.
device
elif
len
(
sys
.
argv
)
>
1
:
if
port_device
==
""
:
if
len
(
sys
.
argv
)
>
1
:
port_device
=
sys
.
argv
[
1
]
return
port_device
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment