ColonelThirtyTwo / FRC-Team-3676-Robot-Code

Code for Team 3676's Robot for FRC
Other
1 stars 1 forks source link

2nd GamePad Right Joystick = Precision Drive Control #11

Closed ColonelThirtyTwo closed 12 years ago

ColonelThirtyTwo commented 12 years ago

Written in ae505d7aaf1d1842f070571a2da255ce810a97e7. Needs testing.

Firespear21 commented 12 years ago

Does not make the robot move slower. Going to access the jaguar directly in the sensitive mode so I can change the value that the stick inputs?

ColonelThirtyTwo commented 12 years ago

Use RobotDrive.arcadeDrive(double moveValue, double rotateValue) and Joystick.getRawAxis(int axis)

Firespear21 commented 12 years ago

Nevermind found a set max output method in RobotDrive class that changes the scale the RobotDrive works on. Code Snippet:

if(stickFine.getRawButton(5)){ //left-y=2 , right-y=5 , left-x=1 , right-x=4 Subsystems.drivesystem.driver.setMaxOutput(.5); Subsystems.drivesystem.driver.arcadeDrive(stickFine, 5, stickFine, 4); }else { Subsystems.drivesystem.driver.setMaxOutput(1); Subsystems.drivesystem.driver.arcadeDrive(stickCoarse, 2, stickCoarse, 4); }

ColonelThirtyTwo commented 12 years ago

Is it a cap or a scale? Cause if its a cap its not really more precise.

Firespear21 commented 12 years ago

It's a scale. In the RobotDrive class anytime it gets input from the axis it multiplies it by that number. The default is 1

ColonelThirtyTwo commented 12 years ago

Ok then, nice find!

Firespear21 commented 12 years ago

Works