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
d91f6032
Commit
d91f6032
authored
4 years ago
by
Peter Švihra
Browse files
Options
Downloads
Patches
Plain Diff
changed cmd timeout to duration
parent
f94ae089
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
raspberry-dataserver/CommsCommon.py
+3
-3
3 additions, 3 deletions
raspberry-dataserver/CommsCommon.py
raspberry-dataserver/hevclient.py
+1
-1
1 addition, 1 deletion
raspberry-dataserver/hevclient.py
raspberry-dataserver/hevserver.py
+1
-1
1 addition, 1 deletion
raspberry-dataserver/hevserver.py
with
5 additions
and
5 deletions
raspberry-dataserver/CommsCommon.py
+
3
−
3
View file @
d91f6032
...
...
@@ -18,7 +18,7 @@ logging.basicConfig(level=logging.INFO,
@unique
class
CMD_TYPE
(
Enum
):
GENERAL
=
1
SET_
TIMEOUT
=
2
SET_
DURATION
=
2
SET_MODE
=
3
SET_THRESHOLD_MIN
=
4
SET_THRESHOLD_MAX
=
5
...
...
@@ -33,7 +33,7 @@ class CMD_GENERAL(Enum):
# Taken from the FSM doc. Correct as of 1400 on 20200417
@unique
class
CMD_SET_
TIMEOUT
(
Enum
):
class
CMD_SET_
DURATION
(
Enum
):
CALIBRATION
=
1
BUFF_PURGE
=
2
BUFF_FLUSH
=
3
...
...
@@ -108,7 +108,7 @@ class ALARM_CODES(Enum):
class
CMD_MAP
(
Enum
):
GENERAL
=
CMD_GENERAL
SET_
TIMEOUT
=
CMD_SET_
TIMEOUT
SET_
DURATION
=
CMD_SET_
DURATION
SET_MODE
=
VENTILATION_MODE
SET_THRESHOLD_MIN
=
ALARM_CODES
SET_THRESHOLD_MAX
=
ALARM_CODES
...
...
This diff is collapsed.
Click to expand it.
raspberry-dataserver/hevclient.py
+
1
−
1
View file @
d91f6032
...
...
@@ -216,7 +216,7 @@ if __name__ == "__main__":
print
(
f
"
Alarms:
{
hevclient
.
get_alarms
()
}
"
)
# set a timeout
hevclient
.
send_cmd
(
"
SET_
TIMEOUT
"
,
"
INHALE
"
,
1111
)
hevclient
.
send_cmd
(
"
SET_
DURATION
"
,
"
INHALE
"
,
1111
)
# check for the readback
for
i
in
range
(
10
):
...
...
This diff is collapsed.
Click to expand it.
raspberry-dataserver/hevserver.py
+
1
−
1
View file @
d91f6032
...
...
@@ -13,7 +13,7 @@ import svpi
import
hevfromtxt
from
hevtestdata
import
HEVTestData
from
CommsLLI
import
CommsLLI
from
CommsCommon
import
PAYLOAD_TYPE
,
CMD_TYPE
,
CMD_GENERAL
,
CMD_SET_
TIMEOUT
,
VENTILATION_MODE
,
ALARM_TYPE
,
ALARM_CODES
,
CMD_MAP
,
CommandFormat
,
AlarmFormat
from
CommsCommon
import
PAYLOAD_TYPE
,
CMD_TYPE
,
CMD_GENERAL
,
CMD_SET_
DURATION
,
VENTILATION_MODE
,
ALARM_TYPE
,
ALARM_CODES
,
CMD_MAP
,
CommandFormat
,
AlarmFormat
from
collections
import
deque
from
serial.tools
import
list_ports
from
typing
import
List
...
...
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