driver mode changes

This commit is contained in:
aarav18
2023-03-22 20:12:27 -06:00
parent f6470655ae
commit 696da42f5a
2 changed files with 4 additions and 2 deletions
@@ -94,6 +94,7 @@ public class RobotContainer {
private SequentialCommandGroup alignToPole = private SequentialCommandGroup alignToPole =
new SequentialCommandGroup( new SequentialCommandGroup(
new RotateToAngle(m_robotSwerveDrive, 0.0), new RotateToAngle(m_robotSwerveDrive, 0.0),
new InstantCommand(() -> m_robotLimeLight.setDriverMode(false), m_robotLimeLight),
new InstantCommand(() -> m_robotLimeLight.setToLimePipeline(), m_robotLimeLight), new InstantCommand(() -> m_robotLimeLight.setToLimePipeline(), m_robotLimeLight),
new LimeAlign(m_robotSwerveDrive, m_robotLimeLight, () -> m_robotLimeLight.getLowestTape().getYaw(), 0.04), new LimeAlign(m_robotSwerveDrive, m_robotLimeLight, () -> m_robotLimeLight.getLowestTape().getYaw(), 0.04),
new RotateToAngle(m_robotSwerveDrive, 0.0), new RotateToAngle(m_robotSwerveDrive, 0.0),
@@ -113,6 +114,7 @@ public class RobotContainer {
private SequentialCommandGroup alignToShelf = private SequentialCommandGroup alignToShelf =
new SequentialCommandGroup( new SequentialCommandGroup(
new AprilRotAlign(m_robotSwerveDrive, m_robotLimeLight), new AprilRotAlign(m_robotSwerveDrive, m_robotLimeLight),
new InstantCommand(() -> m_robotLimeLight.setDriverMode(false), m_robotLimeLight),
new InstantCommand(() -> m_robotLimeLight.setToAprilPipeline(), m_robotLimeLight), new InstantCommand(() -> m_robotLimeLight.setToAprilPipeline(), m_robotLimeLight),
new LimeAlign(m_robotSwerveDrive, m_robotLimeLight, () -> m_robotLimeLight.getAprilPoint().getYaw(), 0.04), new LimeAlign(m_robotSwerveDrive, m_robotLimeLight, () -> m_robotLimeLight.getAprilPoint().getYaw(), 0.04),
new AprilRotAlign(m_robotSwerveDrive, m_robotLimeLight), new AprilRotAlign(m_robotSwerveDrive, m_robotLimeLight),
@@ -122,7 +124,7 @@ public class RobotContainer {
public SequentialCommandGroup place = null; public SequentialCommandGroup place = null;
private Consumer<SequentialCommandGroup> queuePlacement = (scg) -> { private Consumer<SequentialCommandGroup> queuePlacement = (scg) -> {
place = scg.andThen(new InstantCommand(() -> readyForPlacement = false), new InstantCommand(() -> isPole = null), new InstantCommand(() -> place = null)); place = scg.andThen(new InstantCommand(() -> m_robotLimeLight.setDriverMode(true), m_robotLimeLight), new InstantCommand(() -> readyForPlacement = false), new InstantCommand(() -> isPole = null), new InstantCommand(() -> place = null));
}; };
// TODO: find actual values // TODO: find actual values
@@ -25,7 +25,7 @@ public class Limelight extends SubsystemBase {
/** Creates a new Limelight. */ /** Creates a new Limelight. */
public Limelight() { public Limelight() {
cam = new PhotonCamera(VisionConstants.NAME); cam = new PhotonCamera(VisionConstants.NAME);
cam.setDriverMode(false); cam.setDriverMode(true);
} }
public void setLEDs(boolean on) { public void setLEDs(boolean on) {