Changes between Version 2 and Version 3 of ControlSystems/SoftwareTeam/Training/GettingStarted/DCMotor/CANCode
- Timestamp:
- Nov 8, 2019, 11:01:44 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/DCMotor/CANCode
v2 v3 1 {{{ 1 2 /*----------------------------------------------------------------------------*/ 2 3 /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ … … 62 63 @Override 63 64 public void teleopPeriodic() { 64 // Read xbox controller left joystick xaxis65 // Read xbox controller left joystick Y axis 65 66 // value returned is between -1.0 and 1.0 66 67 67 68 // For xbox controller, uncomment the following line 68 // double x = xbox.get X(Hand.kLeft);69 // double x = xbox.getY(Hand.kLeft); 69 70 // For Logitech F310 controller, uncomment the following line 70 // double x =xbox.getRawAxis(1);71 double x = -xbox.getRawAxis(1); 71 72 72 73 // DC Motor controllers apply between -1.0 (full reverse) … … 83 84 } 84 85 } 86 }}}