diff --git a/run.py b/run.py index a9ffbbd..530810d 100644 --- a/run.py +++ b/run.py @@ -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: