From 0da2e3540072f55168017898533037acd24045a0 Mon Sep 17 00:00:00 2001 From: aarav18 Date: Fri, 24 Jan 2020 17:20:15 -0700 Subject: [PATCH] Uncommented Velocity PID --- .../java/frc4388/robot/commands/DriveAtVelocityPID.java | 6 +++--- src/main/java/frc4388/robot/subsystems/Drive.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/frc4388/robot/commands/DriveAtVelocityPID.java b/src/main/java/frc4388/robot/commands/DriveAtVelocityPID.java index c7fa702..229a7b6 100644 --- a/src/main/java/frc4388/robot/commands/DriveAtVelocityPID.java +++ b/src/main/java/frc4388/robot/commands/DriveAtVelocityPID.java @@ -40,9 +40,9 @@ public class DriveAtVelocityPID extends CommandBase { // Called every time the scheduler runs while the command is scheduled. @Override public void execute() { - //m_drive.runVelocityPID(m_drive.m_rightFrontMotor, m_rightTarget); - //m_drive.runVelocityPID(m_drive.m_leftFrontMotor, m_leftTarget); - //m_drive.m_leftFrontMotor.follow(m_drive.m_rightFrontMotor, FollowerType.PercentOutput); + m_drive.runVelocityPID(m_rightTarget); + m_drive.runVelocityPID(m_leftTarget); + m_drive.m_leftFrontMotor.follow(m_drive.m_rightFrontMotor, FollowerType.PercentOutput); } // Called once the command ends or is interrupted. diff --git a/src/main/java/frc4388/robot/subsystems/Drive.java b/src/main/java/frc4388/robot/subsystems/Drive.java index 99e1c4e..21b3c9f 100644 --- a/src/main/java/frc4388/robot/subsystems/Drive.java +++ b/src/main/java/frc4388/robot/subsystems/Drive.java @@ -311,7 +311,7 @@ public class Drive extends SubsystemBase { m_rightFrontMotor.selectProfileSlot(DriveConstants.SLOT_TURNING, DriveConstants.PID_TURN); m_rightFrontMotor.set(TalonFXControlMode.Velocity, 0, DemandType.AuxPID, targetAngle); //m_leftFrontMotor.follow(m_rightFrontMotor, FollowerType.AuxOutput1); - m_rightFrontMotor.set(DemandType.AuxPID, 0); + //m_rightFrontMotor.set(DemandType.AuxPID, 0); } public double getGyroYaw() {