Changes between Version 5 and Version 6 of ControlSystems/GameControllers/LogitechF310
- Timestamp:
- Dec 16, 2019, 11:24:46 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/GameControllers/LogitechF310
v5 v6 13 13 double dirpad_X = xbox.getRawAxis(5); // left=-1, right=1 14 14 double dirpad_Y = xbox.getRawAxis(6); // down=-1, up=1 15 }}} 15 16 17 The buttons can be accessed in the same way as a joystick. For example, in OI.java: 18 19 {{{ 20 XboxController xbox = new XboxController(0); 21 Button aButton = new JoystickButton(xbox, 1); 22 Button bButton = new JoystickButton(xbox, 2); 23 Button xButton = new JoystickButton(xbox, 3); 24 Button yButton = new JoystickButton(xbox, 4); 25 26 public OI() { 27 aButton.whenPressed(new ACommand()); 28 bButton.whenPressed(new Bcommand()); 29 } 16 30 }}}