From 72c9b27e023001107d416364a68eba22348156d0 Mon Sep 17 00:00:00 2001 From: "Keenan D. Buckley" Date: Fri, 8 Mar 2019 17:17:45 -0700 Subject: [PATCH] Change Absolute Turn to use Absolute Turn Commands --- 2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java | 2 +- .../usfirst/frc4388/robot/commands/DriveAbsoluteTurnPID.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java index eca53c9..1b187bb 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/OI.java @@ -96,7 +96,7 @@ public class OI TurnDriveTrain90.whenPressed(new DriveRelativeTurnPID(90, MPSoftwareTurnType.TANK)); JoystickButton TurnTo0NavX = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.LEFT_JOYSTICK_BUTTON); - TurnTo0NavX.whenPressed(new DriveRelativeTurnPID(0, MPSoftwareTurnType.TANK)); + TurnTo0NavX.whenPressed(new DriveAbsoluteTurnPID(0, MPSoftwareTurnType.TANK)); SmartDashboard.putData("switch to manuel", new SetManual()); SmartDashboard.putData("run arm test", new ArmTest()); diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveAbsoluteTurnPID.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveAbsoluteTurnPID.java index 5498c45..4cbd68f 100644 --- a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveAbsoluteTurnPID.java +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveAbsoluteTurnPID.java @@ -31,7 +31,7 @@ public class DriveAbsoluteTurnPID extends Command { // Called just before this Command runs the first time @Override protected void initialize() { - Robot.drive.setRelativeTurnPID(absoluteTurnAngleDeg, 0.3, 0.1, turnType); + Robot.drive.setAbsoluteTurnPID(absoluteTurnAngleDeg, 0.3, 0.1, turnType); } // Called repeatedly when this Command is scheduled to run