Merge branch 'cleanup' of https://github.com/Team4388/2022NoWayHome into cleanup

This commit is contained in:
aarav18
2022-04-07 18:33:46 -06:00
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ public class Robot extends TimedRobot {
@Override @Override
public void disabledPeriodic() { public void disabledPeriodic() {
// m_robotContainer.m_robotVisionOdometry.setLEDs(false); m_robotContainer.m_robotVisionOdometry.setLEDs(false);
} }
/** /**
@@ -458,14 +458,14 @@ public class RobotContainer {
); );
} }
private SequentialCommandGroup shoot(double storageRunTime, double timeout) { private ParallelRaceGroup shoot(double storageRunTime, double timeout) {
return new SequentialCommandGroup( return new SequentialCommandGroup(
new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true).withTimeout(timeout), new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true),
new ParallelCommandGroup( new ParallelCommandGroup(
new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true).until(TrackTarget::isTargetNotLocked), new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true),
new RunCommandForTime(new RunCommand(() -> m_robotStorage.runStorage(StorageConstants.STORAGE_SPEED), m_robotStorage), storageRunTime, true) new RunCommandForTime(new RunCommand(() -> m_robotStorage.runStorage(StorageConstants.STORAGE_SPEED), m_robotStorage), storageRunTime, true)
) )
); ).withTimeout(timeout + storageRunTime);
} }
SequentialCommandGroup weirdAutoShootingGroup = new SequentialCommandGroup(new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true), SequentialCommandGroup weirdAutoShootingGroup = new SequentialCommandGroup(new TrackTarget(m_robotTurret, m_robotBoomBoom, m_robotHood, m_robotVisionOdometry, m_robotLED, true),
@@ -496,7 +496,7 @@ public class RobotContainer {
SequentialCommandGroup extendThenAimTurret() { SequentialCommandGroup extendThenAimTurret() {
return new SequentialCommandGroup( return new SequentialCommandGroup(
new ExtenderIntakeGroup(m_robotIntake, m_robotExtender), new ExtenderIntakeGroup(m_robotIntake, m_robotExtender),
new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID((180.0 / Math.PI) * Math.atan2(-(82.83 / 2.00) + 15.56, -(219.25 / 2.00) - 40.44 + 10.00)), m_robotTurret), 1.0, true) // TODO: optimize time new RunCommandForTime(new RunCommand(() -> m_robotTurret.runShooterRotatePID(-180), m_robotTurret), 1.0, true) // TODO: optimize time
); );
} }
@@ -45,7 +45,7 @@ public class VisionOdometry extends SubsystemBase {
public VisionOdometry(SwerveDrive drive, Turret shooter) { public VisionOdometry(SwerveDrive drive, Turret shooter) {
// do{ // do{
m_camera = new PhotonCamera(VisionConstants.NAME); m_camera = new PhotonCamera(VisionConstants.NAME);
// }while(m_camera.getLatestResult().getLatencyMillis() == 0.d); // } while (m_camera.getLatestResult().getLatencyMillis() == 0.d);
m_drive = drive; m_drive = drive;
m_shooter = shooter; m_shooter = shooter;