This commit is contained in:
Ryan
2022-03-24 13:30:43 -06:00
parent 1221fb74d5
commit 4bc1dc6b37
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ public class Robot extends TimedRobot {
LOGGER.log(Level.SEVERE, "Unable to record path to {0}", outputFile.getPath()); LOGGER.log(Level.SEVERE, "Unable to record path to {0}", outputFile.getPath());
} }
m_robotContainer.m_robotVisionOdometry.setLEDs(true); m_robotContainer.m_robotVisionOdometry.setLEDs(false);
} }
@Override @Override
@@ -65,6 +65,7 @@ public class TrackTarget extends CommandBase {
this.timeTolerance = 1000; this.timeTolerance = 1000;
addRequirements(m_turret, m_boomBoom, m_hood, m_visionOdometry); addRequirements(m_turret, m_boomBoom, m_hood, m_visionOdometry);
SmartDashboard.putNumber("Distance Adjust", 20);
} }
public TrackTarget(Turret turret, BoomBoom boomBoom, Hood hood, VisionOdometry visionOdometry) { public TrackTarget(Turret turret, BoomBoom boomBoom, Hood hood, VisionOdometry visionOdometry) {
@@ -110,8 +111,9 @@ public class TrackTarget extends CommandBase {
double regressedDistance = getDistance(average.y); double regressedDistance = getDistance(average.y);
// ! no longer a +30 lol -aarav // ! no longer a +30 lol -aarav
velocity = m_boomBoom.getVelocity(regressedDistance + 20); double distAdj = SmartDashboard.getNumber("Distance Adjust", 20);
hoodPosition = m_boomBoom.getHood(regressedDistance + 20); velocity = m_boomBoom.getVelocity(regressedDistance + distAdj);
hoodPosition = m_boomBoom.getHood(regressedDistance + distAdj);
m_boomBoom.runDrumShooterVelocityPID(velocity); m_boomBoom.runDrumShooterVelocityPID(velocity);
m_hood.runAngleAdjustPID(hoodPosition); m_hood.runAngleAdjustPID(hoodPosition);