@@ -870,33 +870,34 @@ public static Gamepad logitechF310(int port) {
870870 () -> joystick .getRawButton (8 ),
871871 () -> joystick .getRawButton (9 ));
872872 }
873- }
874- /**
875- * Create a Microsoft Xbox360 gamepad controlled by the Driver Station.
876- *
877- * @param port the port on the driver station that the gamepad is plugged into
878- * @return the input device; never null
879- */
880- public static Gamepad xbox360 (int port ) {
881- Joystick joystick = new Joystick (port );
882- return Gamepad .create (joystick ::getRawAxis ,
883- joystick ::getRawButton ,
884- joystick ::getPOV ,
885- () -> joystick .getRawAxis (0 ),
886- () -> joystick .getRawAxis (1 ) * -1 ,
887- () -> joystick .getRawAxis (4 ),
888- () -> joystick .getRawAxis (5 ) * -1 ,
889- () -> joystick .getRawAxis (2 ),
890- () -> joystick .getRawAxis (3 ),
891- () -> joystick .getRawButton (5 ),
892- () -> joystick .getRawButton (6 ),
893- () -> joystick .getRawButton (1 ),
894- () -> joystick .getRawButton (2 ),
895- () -> joystick .getRawButton (3 ),
896- () -> joystick .getRawButton (4 ),
897- () -> joystick .getRawButton (8 ),
898- () -> joystick .getRawButton (7 ),
899- () -> joystick .getRawButton (9 ),
900- () -> joystick .getRawButton (10 ));
873+
874+ /**
875+ * Create a Microsoft Xbox360 gamepad controlled by the Driver Station.
876+ *
877+ * @param port the port on the driver station that the gamepad is plugged into
878+ * @return the input device; never null
879+ */
880+ public static Gamepad xbox360 (int port ) {
881+ Joystick joystick = new Joystick (port );
882+ return Gamepad .create (joystick ::getRawAxis ,
883+ joystick ::getRawButton ,
884+ joystick ::getPOV ,
885+ () -> joystick .getRawAxis (0 ),
886+ () -> joystick .getRawAxis (1 ) * -1 ,
887+ () -> joystick .getRawAxis (4 ),
888+ () -> joystick .getRawAxis (5 ) * -1 ,
889+ () -> joystick .getRawAxis (2 ),
890+ () -> joystick .getRawAxis (3 ),
891+ () -> joystick .getRawButton (5 ),
892+ () -> joystick .getRawButton (6 ),
893+ () -> joystick .getRawButton (1 ),
894+ () -> joystick .getRawButton (2 ),
895+ () -> joystick .getRawButton (3 ),
896+ () -> joystick .getRawButton (4 ),
897+ () -> joystick .getRawButton (8 ),
898+ () -> joystick .getRawButton (7 ),
899+ () -> joystick .getRawButton (9 ),
900+ () -> joystick .getRawButton (10 ));
901+ }
901902 }
902903}
0 commit comments