View Single Post
  #13   Spotlight this post!  
Unread 03-03-2015, 09:53
Cyborg Mustang's Avatar
Cyborg Mustang Cyborg Mustang is offline
Registered User
FRC #2647
 
Join Date: Oct 2013
Location: Phoeniz, AZ
Posts: 18
Cyborg Mustang is an unknown quantity at this point
Axis 1 because it is the forward-backward axis on the left stick and Axis 3 because it is the forward-backward axis on the right stick. We purposely skipped 0 and 2, which are the sideways axes. To get the value of the axes we do "gamepad.getRawAxis(1)" and "gamepad.getRawAxis(3)" and store those in separate variables of type double. The speeds are then multiplied by a selected modifier in the array [0.25, 0.5, or 0.75] the index of which is determined by the press of 3 buttons. We then plug the modified speed in like so: "drive.TankDrive(modifiedSpeedLeft, modifiedSpeedRight)"
__________________
Cyborg Mustangs Team 2647
North High School
Phoenix, AZ
Reply With Quote