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
d31f765e
Commit
d31f765e
authored
4 years ago
by
Dónal Murray
Browse files
Options
Downloads
Patches
Plain Diff
Fix input file for hevserver
parent
742e916f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
raspberry-dataserver/hevclient.py
+8
-6
8 additions, 6 deletions
raspberry-dataserver/hevclient.py
raspberry-dataserver/hevfromtxt.py
+4
-5
4 additions, 5 deletions
raspberry-dataserver/hevfromtxt.py
with
12 additions
and
11 deletions
raspberry-dataserver/hevclient.py
+
8
−
6
View file @
d31f765e
...
@@ -50,15 +50,17 @@ class HEVClient(object):
...
@@ -50,15 +50,17 @@ class HEVClient(object):
if
payload
[
"
type
"
]
==
"
keepalive
"
:
if
payload
[
"
type
"
]
==
"
keepalive
"
:
#Still alive
#Still alive
continue
continue
elif
payload
[
"
type
"
]
==
"
DATA
"
:
elif
payload
[
"
type
"
]
==
"
broadcast
"
:
with
self
.
_lock
:
with
self
.
_lock
:
self
.
_values
=
payload
[
"
DATA
"
]
self
.
_values
=
payload
[
"
sensors
"
]
elif
payload
[
"
type
"
]
==
"
READBACK
"
:
elif
payload
[
"
type
"
]
==
"
READBACK
"
:
with
self
.
_lock
:
pass
self
.
_readback
=
payload
[
"
READBACK
"
]
#with self._lock:
# self._readback = payload["READBACK"]
elif
payload
[
"
type
"
]
==
"
CYCLE
"
:
elif
payload
[
"
type
"
]
==
"
CYCLE
"
:
with
self
.
_lock
:
pass
self
.
_cycle
=
payload
[
"
CYCLE
"
]
#with self._lock:
# self._cycle = payload["CYCLE"]
elif
payload
[
"
type
"
]
==
"
THRESHOLDS
"
:
elif
payload
[
"
type
"
]
==
"
THRESHOLDS
"
:
with
self
.
_lock
:
with
self
.
_lock
:
self
.
_thresholds
=
payload
[
"
THRESHOLDS
"
]
self
.
_thresholds
=
payload
[
"
THRESHOLDS
"
]
...
...
This diff is collapsed.
Click to expand it.
raspberry-dataserver/hevfromtxt.py
+
4
−
5
View file @
d31f765e
...
@@ -38,11 +38,10 @@ class hevfromtxt():
...
@@ -38,11 +38,10 @@ class hevfromtxt():
while
True
:
while
True
:
# directly setting private member variables in this edge case
# directly setting private member variables in this edge case
payload
=
CommsCommon
.
DataFormat
()
payload
=
CommsCommon
.
DataFormat
()
payload
.
version
=
payload
.
_RPI_VERSION
payload
.
timestamp
=
int
(
time_offset
+
self
.
_timestamp
[
self
.
_pos
]
*
1000
)
payload
.
timestamp
=
time_offset
+
self
.
_timestamp
[
self
.
_pos
]
payload
.
pressure_buffer
=
int
(
self
.
_pressure
[
self
.
_pos
])
payload
.
pressure_buffer
=
self
.
_pressure
[
self
.
_pos
]
payload
.
pressure_inhale
=
int
(
self
.
_volume
[
self
.
_pos
])
payload
.
pressure_inhale
=
self
.
_volume
[
self
.
_pos
]
payload
.
temperature_buffer
=
int
(
abs
(
self
.
_flow
[
self
.
_pos
]))
payload
.
temperature_buffer
=
self
.
_flow
[
self
.
_pos
]
self
.
payloadrecv
=
payload
self
.
payloadrecv
=
payload
if
self
.
_pos
+
self
.
_increment
<
self
.
_length
:
if
self
.
_pos
+
self
.
_increment
<
self
.
_length
:
...
...
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