9
0
Fork 0

add line value and threshold

This commit is contained in:
Silver Kuusik 2018-12-27 08:58:49 +01:00 committed by GitHub
parent d7ba4efa8e
commit 25dd06f4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ def ws_handler():
sumorobot.calibrate_line_value()
#print('calibrate_line')
elif b'calibrate_line_threshold' in data:
sumorobot.calibrate_line_threshold()
data = ujson.loads(data)
sumorobot.calibrate_line_threshold(int(data['val']))
#print('calibrate_threshold')
elif b'Gone' in data:
print("server said 410 Gone, attempting to reconnect...")