diff options
author | Florian Jung <flo@windfisch.org> | 2015-01-22 20:50:43 +0100 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-01-22 20:50:43 +0100 |
commit | 6d45dfebd2f0146e42778f9b0195ce788f7384a3 (patch) | |
tree | 8e466a0259730cde973fbbc612eae46f4d40ff83 /server.py | |
parent | f88c8eab3ac10be727ab54adeccc19d58c35406c (diff) |
configurable resolution
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -8,6 +8,8 @@ import threading import time import struct +OVERRIDE_THRESHOLD=0.01 + def putStatusText(img, text, pos, activated): cv2.putText(img, text, pos, cv2.FONT_HERSHEY_PLAIN, 1, (0,0,255) if activated else (127,127,127), 2 if activated else 1) @@ -144,7 +146,7 @@ while True: js_radius = math.sqrt(js_x**2 + js_y**2) if btn_leftshoulder==0: js_x, js_y = ( js_x * cos(rel_angle) + js_y * sin(rel_angle) ) , ( -js_x * sin(rel_angle) + js_y * cos(rel_angle) ) - + js_hover = (btn_rightshoulder==0 and (js_radius <= 0.01)) if (js_radius > OVERRIDE_THRESHOLD): manual_override_xy = True |