Changes between Initial Version and Version 1 of ControlSystems/GameControllers/LogitechF310


Ignore:
Timestamp:
Nov 3, 2019, 10:14:38 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/GameControllers/LogitechF310

    v1 v1  
     1The Logitech F310 game controller is an inexpensive alternative to the standard Xbox controller that can be purchased form $15 to [https://www.amazon.com/Logitech-940-000110-Gamepad-F310/dp/B003VAHYQY $20] delivered.   The F310 uses different constants for accessing the joysticks so you can't rely on the constants defined in GenericHID.Hand. 
     2
     3You can access the F310 joystick axes using the method xbox.getRawAxis(n) where n is the axis number.
     4   * 0=left X axis
     5   * 1=left Y axis
     6   * 2=left analog trigger
     7   * 3=right analog trigger
     8   * 4=right X axis
     9   * 5=right Y axis
     10
     11So, for example, to read the right joystick position:
     12{{{
     13   XboxController xbox = new XboxController(0);
     14   double right_X = xbox.getRawAxis(4);
     15   double right_Y = xbox.getRawAxis(5);
     16}}}