@@ -145,11 +145,10 @@ def _read_joystick_y(self, samples=3):
145145 reading -= JOY_Y_CTR
146146 return reading
147147
148- def _check_cursor_movement (self , pressed = None , variance = 100 ):
148+ def _check_cursor_movement (self , pressed = None ):
149149 """Checks the PyBadge D-Pad or the PyGamer's Joystick for movement.
150150 :param int pressed: 8-bit number with bits that correspond to buttons
151151 which have been pressed down since the last call to get_pressed().
152- :param int variance: Drift amount, defaults to 100. Adjust for lower sensitivity.
153152 """
154153 if hasattr (board , "BUTTON_CLOCK" ) and not hasattr (board , "JOYSTICK_X" ):
155154 if pressed & self ._pad_btns ["btn_right" ]:
@@ -163,13 +162,13 @@ def _check_cursor_movement(self, pressed=None, variance = 100):
163162 elif hasattr (board , "JOYSTICK_X" ):
164163 joy_x = self ._read_joystick_x ()
165164 joy_y = self ._read_joystick_y ()
166- if joy_x > self ._center_x + variance :
165+ if joy_x > self ._center_x + 100 :
167166 self ._cursor .x += self ._cursor .speed
168- elif joy_x < self ._center_x - variance :
167+ elif joy_x < self ._center_x - 100 :
169168 self ._cursor .x -= self ._cursor .speed
170- if joy_y > self ._center_y + variance :
169+ if joy_y > self ._center_y + 100 :
171170 self ._cursor .y += self ._cursor .speed
172- elif joy_y < self ._center_y - variance :
171+ elif joy_y < self ._center_y - 100 :
173172 self ._cursor .y -= self ._cursor .speed
174173 else :
175174 raise AttributeError (
0 commit comments