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
99a6dd57
Commit
99a6dd57
authored
4 years ago
by
Karol Hennessy
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
4e39f467
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arduino/hev_prototype_v1/src/BreathingLoop.h
+8
-8
8 additions, 8 deletions
arduino/hev_prototype_v1/src/BreathingLoop.h
raspberry-dataserver/CommsCommon.py
+15
-11
15 additions, 11 deletions
raspberry-dataserver/CommsCommon.py
with
23 additions
and
19 deletions
arduino/hev_prototype_v1/src/BreathingLoop.h
+
8
−
8
View file @
99a6dd57
...
...
@@ -70,14 +70,14 @@ public:
CALIBRATION
=
2
,
BUFF_PREFILL
=
3
,
BUFF_FILL
=
4
,
BUFF_PRE_INHALE
=
6
,
INHALE
=
7
,
PAUSE
=
8
,
EXHALE
=
9
,
STOP
=
11
,
BUFF_PURGE
=
1
2
,
BUFF_FLUSH
=
1
3
,
STANDBY
=
1
4
BUFF_PRE_INHALE
=
5
,
INHALE
=
6
,
PAUSE
=
7
,
EXHALE
=
8
,
STOP
=
9
,
BUFF_PURGE
=
1
0
,
BUFF_FLUSH
=
1
1
,
STANDBY
=
1
2
};
...
...
This diff is collapsed.
Click to expand it.
raspberry-dataserver/CommsCommon.py
+
15
−
11
View file @
99a6dd57
...
...
@@ -154,14 +154,14 @@ class BL_STATES(Enum):
CALIBRATION
=
2
BUFF_PREFILL
=
3
BUFF_FILL
=
4
BUFF_PRE_INHALE
=
6
INHALE
=
7
PAUSE
=
8
EXHALE
=
10
STOP
=
11
BUFF_PURGE
=
1
2
BUFF_FLUSH
=
1
3
STANDBY
=
1
4
BUFF_PRE_INHALE
=
5
INHALE
=
6
PAUSE
=
7
EXHALE
=
8
STOP
=
9
BUFF_PURGE
=
1
0
BUFF_FLUSH
=
1
1
STANDBY
=
1
2
@unique
class
PAYLOAD_TYPE
(
IntEnum
):
...
...
@@ -526,7 +526,7 @@ class LoopStatusFormat(PayloadFormat):
# =======================================
@dataclass
class
IVTFormat
(
PayloadFormat
):
_dataStruct
=
Struct
(
"
<BIBffffffffff
bbbbb
f
"
)
_dataStruct
=
Struct
(
"
<BIBffffffffff
BBBBB
f
"
)
payload_type
:
PAYLOAD_TYPE
=
PAYLOAD_TYPE
.
IVT
inhale_current
:
float
=
0.0
...
...
@@ -581,7 +581,7 @@ class IVTFormat(PayloadFormat):
# =======================================
@dataclass
class
TargetFormat
(
PayloadFormat
):
_dataStruct
=
Struct
(
"
<BIBBffffffH
"
)
_dataStruct
=
Struct
(
"
<BIBBffffffH
ff
"
)
payload_type
:
PAYLOAD_TYPE
=
PAYLOAD_TYPE
.
TARGET
mode
:
int
=
0
...
...
@@ -592,6 +592,8 @@ class TargetFormat(PayloadFormat):
peep
:
float
=
0.0
fiO2
:
float
=
0.0
inhale_time
:
int
=
0
buffer_upper_pressure
:
float
=
0.0
buffer_lower_pressure
:
float
=
0.0
# for receiving DataFormat from microcontroller
# fill the struct from a byteArray,
...
...
@@ -610,7 +612,9 @@ class TargetFormat(PayloadFormat):
self
.
respiratory_rate
,
self
.
peep
,
self
.
fiO2
,
self
.
inhale_time
)
=
self
.
_dataStruct
.
unpack
(
byteArray
)
self
.
inhale_time
,
self
.
buffer_upper_pressure
,
self
.
buffer_lower_pressure
)
=
self
.
_dataStruct
.
unpack
(
byteArray
)
self
.
checkVersion
()
self
.
payload_type
=
PAYLOAD_TYPE
(
tmp_payload_type
)
...
...
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