halfed the feeback coefficient

This commit is contained in:
Aarav Shah
2020-03-07 14:24:10 -07:00
parent e9754feabd
commit edc1467710
3 changed files with 9 additions and 4 deletions
@@ -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.");
@@ -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.");
@@ -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());