diff --git a/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java index a2be80e..1ec57b0 100644 --- a/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionMM.java @@ -33,9 +33,9 @@ public class DriveStraightToPositionMM extends CommandBase { m_pneumatics = subsystem2; try { if (m_pneumatics.m_isSpeedShiftHigh) { - m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_HIGH * 2; + m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_HIGH; } else { - m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_LOW * 2; + m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_LOW; } } catch (Exception e) { System.err.println("Error In Motion Magic Switch Gains."); diff --git a/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java index 337ff6d..b910380 100644 --- a/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java +++ b/src/main/java/frc4388/robot/commands/drive/DriveStraightToPositionPID.java @@ -31,9 +31,9 @@ public class DriveStraightToPositionPID extends CommandBase { m_pneumatics = subsystem2; try { if (m_pneumatics.m_isSpeedShiftHigh) { - m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_HIGH * 2; + m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_HIGH; } else { - m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_LOW * 2; + m_targetPosIn = targetPos * DriveConstants.TICKS_PER_INCH_LOW; } } catch (Exception e) { System.err.println("Error In Motion Magic Switch Gains."); diff --git a/src/main/java/frc4388/robot/subsystems/Drive.java b/src/main/java/frc4388/robot/subsystems/Drive.java index bf19e3f..a07f2ec 100644 --- a/src/main/java/frc4388/robot/subsystems/Drive.java +++ b/src/main/java/frc4388/robot/subsystems/Drive.java @@ -195,6 +195,8 @@ public class Drive extends SubsystemBase { m_rightFrontMotor.configSelectedFeedbackSensor(FeedbackDevice.SensorDifference, DriveConstants.PID_PRIMARY, DriveConstants.DRIVE_TIMEOUT_MS); + m_rightFrontMotor.configSelectedFeedbackCoefficient(0.5, DriveConstants.PID_PRIMARY, DriveConstants.DRIVE_TIMEOUT_MS); + /* * Configure the Pigeon IMU to the other Remote Slot available on the right * Talon @@ -826,6 +828,9 @@ public class Drive extends SubsystemBase { public void updateSmartDashboard() { try { + + + // SmartDashboard.putNumber("Pigeon Yaw", getGyroYaw()); // SmartDashboard.putNumber("Pigeon Pitch", getGyroPitch()); // SmartDashboard.putNumber("Pigeon Roll", getGyroRoll());