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
ca03a3f3
Commit
ca03a3f3
authored
4 years ago
by
adam-abed-abud
Browse files
Options
Downloads
Patches
Plain Diff
Setting timeout threshold
parent
d91f6032
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
raspberry-backend/app.py
+5
-21
5 additions, 21 deletions
raspberry-backend/app.py
with
5 additions
and
21 deletions
raspberry-backend/app.py
+
5
−
21
View file @
ca03a3f3
...
...
@@ -231,28 +231,12 @@ def send_cmd():
@WEBAPP.route
(
'
/data_handler
'
,
methods
=
[
'
POST
'
])
def
data_handler
():
"""
Se
nd configuration
data to the Arduino
Se
t timeout threshold
data to the Arduino
"""
output
=
[]
var_1
=
request
.
form
[
'
pressure_air_supply
'
]
var_2
=
request
.
form
[
'
variable2
'
]
var_3
=
request
.
form
[
'
variable3
'
]
var_4
=
request
.
form
[
'
variable4
'
]
var_5
=
request
.
form
[
'
variable5
'
]
var_6
=
request
.
form
[
'
variable6
'
]
patient_name
=
request
.
form
[
'
patient_name
'
]
multiple_appends
(
output
,
var_1
,
var_2
,
var_3
,
var_4
,
var_5
,
var_6
)
converted_output
=
[
float
(
i
)
for
i
in
output
]
print
(
converted_output
)
print
(
"
The thresholds are set with a command, not with a set threshold function
"
)
#hevclient.set_thresholds(converted_output)
data
=
request
.
get_json
(
force
=
True
)
print
(
client
.
send_cmd
(
"
SET_DURATION
"
,
data
[
'
name
'
].
upper
(),
int
(
data
[
'
value
'
])))
return
(
''
,
204
)
return
render_template
(
'
index.html
'
,
result
=
live_data
(),
patient
=
patient_name
)
...
...
@@ -416,4 +400,4 @@ def parse_args():
if
__name__
==
'
__main__
'
:
ARGS
=
parse_args
()
#db_backup(ARGS.backup_time)
WEBAPP
.
run
(
debug
=
True
,
host
=
ARGS
.
host
,
port
=
5000
)
\ No newline at end of file
WEBAPP
.
run
(
debug
=
True
,
host
=
ARGS
.
host
,
port
=
5000
)
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