Autoformatted
This commit is contained in:
parent
05d435c64c
commit
6055b2a879
@ -17,9 +17,9 @@ public class Drive extends CommandBase {
|
||||
double x = Robot.oi.getJoysticks()[0].getRawAxis(0);
|
||||
double y = Robot.oi.getJoysticks()[0].getRawAxis(1);
|
||||
double z = Robot.oi.getJoysticks()[0].getRawAxis(2);
|
||||
if(Robot.oi.getJoysticks()[0].getRawButton(2)){
|
||||
if (Robot.oi.getJoysticks()[0].getRawButton(2)) {
|
||||
sensitivity = 1;
|
||||
}else{
|
||||
} else {
|
||||
sensitivity = 0.5;
|
||||
}
|
||||
driveBase.driveArcade(x, y, z, sensitivity);
|
||||
|
@ -23,10 +23,10 @@ public class DriveBase extends Subsystem {
|
||||
rightMotorTwo.set(0);
|
||||
}
|
||||
public void driveArcade(double x, double y, double z, double sensitivity) {
|
||||
leftMotorOne.set((-y + (x + z))*sensitivity);
|
||||
leftMotorTwo.set((-y + (x + z))*sensitivity);
|
||||
rightMotorOne.set((y + (x + z))*sensitivity);
|
||||
rightMotorTwo.set((y + (x + z))*sensitivity);
|
||||
leftMotorOne.set((-y + (x + z)) * sensitivity);
|
||||
leftMotorTwo.set((-y + (x + z)) * sensitivity);
|
||||
rightMotorOne.set((y + (x + z)) * sensitivity);
|
||||
rightMotorTwo.set((y + (x + z)) * sensitivity);
|
||||
}
|
||||
public void pidDrive(double setpoint) {
|
||||
leftEncoder.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user