1

ok de hardware probleem is nu echt fixed

This commit is contained in:
Ventilaar 2021-01-19 15:44:12 +01:00
parent 249ee1910f
commit cdbfa40f4b

4
run.py
View File

@ -97,7 +97,7 @@ def fulltable():
@app.route('/hardware')
def hw_funcs():
def hardware():
return render_template('hardware.html', RPI=RPI)
@ -201,10 +201,10 @@ def api_ledstrip_set():
global state_ledstrip
if request.method == 'POST':
# we ontvangen de volgenende waarde '#XXXXXX' maar de driver ondersteunt allen '0xFFFFFF'
string_state = request.form['setstate']
try:
# we ontvangen de volgenende waarde '#XXXXXX' maar de driver ondersteunt allen '0xFFFFFF'
desired_state = hex(int(string_state[1:], 16))
hw_funcs.set_strip(desired_state)
except: