finished AimToCenter

This commit is contained in:
Ryan Manley
2022-02-24 19:32:33 -07:00
parent 038ef47841
commit 31346ff646
2 changed files with 5 additions and 15 deletions
+3 -14
View File
@@ -83,12 +83,6 @@ public final class Constants {
public static final int XBOX_OPERATOR_ID = 1;
}
public static final class OdoAimConstants {
public static final double X_VECTOR_DISTANCE = 12.3;
// public static final Gains AIM_GAINS = new Gains(0, 0, 0, 0, 0, 0, 1);
}
public static final class ShooterConstants {
/* PID Constants Shooter */
public static final int CLOSED_LOOP_TIME_MS = 1;
@@ -116,6 +110,9 @@ public final class Constants {
public static final Gains SHOOTER_ANGLE_GAINS = new Gains(0.05, 0.0, 0.0, 0.0, 0, 0.3);
public static final double SHOOTER_TURRET_MIN = -1.0;
public static final double DEADZONE_LEFT = -20.0;
public static final double DEADZONE_RIGHT = 0.0;
public static final int SHOOTER_FALCON_BALLER_ID = 0; //unknown value, fix later//
public static final int SHOOTER_FALCON_BALLER_FOLLOWER_ID = 0; //"//
@@ -133,13 +130,5 @@ public final class Constants {
public static final double TARGET_HEIGHT = 67.5;
public static final double FOV = 29.8; //Field of view limelight
public static final double LIME_ANGLE = 24.7;
}
}
@@ -5,6 +5,7 @@
package frc4388.robot.commands;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc4388.robot.Constants.ShooterConstants;
import frc4388.robot.subsystems.SwerveDrive;
import frc4388.robot.subsystems.Turret;
@@ -53,7 +54,7 @@ public class AimToCenter extends CommandBase {
}
public boolean isDeadzone() {
if ((-20 < m_targetAngle) && (m_targetAngle < 0)) { //Make both -20 and 0 Constants
if ((ShooterConstants.DEADZONE_LEFT < m_targetAngle) && (m_targetAngle < ShooterConstants.DEADZONE_RIGHT)) {
return true;
} else {
return false;