File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -128,20 +128,20 @@ def read_joystick_angle(threshold=0.1):
128128 val_up_down = adc_up_down .read ()
129129 val_left_right = adc_left_right .read ()
130130
131- if time .time () < 60 :
132- print (f"val_up_down: { val_up_down } " )
133- print (f"val_left_right: { val_left_right } " )
131+ # if time.time() < 60:
132+ # print(f"val_up_down: {val_up_down}")
133+ # print(f"val_left_right: {val_left_right}")
134134
135135 # Normalize to [-1, 1]
136136 x = (val_left_right - 2048 ) / 2048 # Positive x = RIGHT
137137 y = (val_up_down - 2048 ) / 2048 # Positive y = UP
138- if time .time () < 60 :
139- print (f"x,y = { x } ,{ y } " )
138+ # if time.time() < 60:
139+ # print(f"x,y = {x},{y}")
140140
141141 # Check if joystick is near center
142142 magnitude = math .sqrt (x * x + y * y )
143- if time .time () < 60 :
144- print (f"magnitude: { magnitude } " )
143+ # if time.time() < 60:
144+ # print(f"magnitude: {magnitude}")
145145 if magnitude < threshold :
146146 return None # Neutral position
147147
You can’t perform that action at this time.
0 commit comments