Skip to content
Snippets Groups Projects
Commit ca03a3f3 authored by adam-abed-abud's avatar adam-abed-abud
Browse files

Setting timeout threshold

parent d91f6032
Branches
No related merge requests found
......@@ -231,28 +231,12 @@ def send_cmd():
@WEBAPP.route('/data_handler', methods=['POST'])
def data_handler():
"""
Send configuration data to the Arduino
Set 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)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment