File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,13 @@ def getDirectionRadians(self) -> float:
207
207
:returns: The direction of the vector in radians
208
208
"""
209
209
# https://docs.wpilib.org/en/stable/docs/software/basic-programming/coordinate-system.html#joystick-and-controller-coordinate-system
210
- # +X is right and +Y is back, so 0 radians is right and CW is positive. Rotate by 90 degrees
211
- # CCW to make 0 radians forward and CW positive.
210
+ # A positive rotation around the X axis moves the joystick right, and a
211
+ # positive rotation around the Y axis moves the joystick backward. When
212
+ # treating them as translations, 0 radians is measured from the right
213
+ # direction, and angle increases clockwise.
214
+ #
215
+ # It's rotated 90 degrees CCW (y is negated and the arguments are reversed)
216
+ # so that 0 radians is forward.
212
217
return self ._hid .getDirectionRadians ()
213
218
214
219
def getDirectionDegrees (self ) -> float :
You can’t perform that action at this time.
0 commit comments