diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 4acc96a..669e06a 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -383,8 +383,8 @@ public class RobotContainer { // * CommandChooser with BooleanSuppliers .whenPressed(new ComplexCommandChooser(new HashMap() {{ - put(new RunClimberPath(m_robotClimber, m_robotClaws, new Point[] {new Point()}), () -> currentControlMode.equals(SubsystemMode.CLIMBER)); - put(new AimToCenter(m_robotTurret, m_robotSwerveDrive, m_robotVisionOdometry), () -> currentControlMode.equals(SubsystemMode.SHOOTER)); + put(new InstantCommand(() -> System.out.println("true")), () -> true); + put(new InstantCommand(() -> System.out.println("false")), () -> false); }})); // .whenPressed(new CommandChooser(new RunClimberPath(m_robotClimber, m_robotClaws, new Point[] {new Point()}), // new AimToCenter(m_robotTurret, m_robotSwerveDrive, m_robotVisionOdometry), diff --git a/src/main/java/frc4388/robot/commands/BasicCommandChooser.java b/src/main/java/frc4388/robot/commands/BasicCommandChooser.java index e1532fe..0e4b4b5 100644 --- a/src/main/java/frc4388/robot/commands/BasicCommandChooser.java +++ b/src/main/java/frc4388/robot/commands/BasicCommandChooser.java @@ -30,7 +30,7 @@ public class BasicCommandChooser extends CommandBase { Set allReqs = c1.getRequirements(); allReqs.addAll(c2.getRequirements()); - addRequirements((Subsystem[]) allReqs.toArray()); + addRequirements(allReqs.toArray(Subsystem[]::new)); } public Command getTheChosenOne() { diff --git a/src/main/java/frc4388/robot/commands/ComplexCommandChooser.java b/src/main/java/frc4388/robot/commands/ComplexCommandChooser.java index e9c5443..c5aec85 100644 --- a/src/main/java/frc4388/robot/commands/ComplexCommandChooser.java +++ b/src/main/java/frc4388/robot/commands/ComplexCommandChooser.java @@ -32,7 +32,7 @@ public class ComplexCommandChooser extends CommandBase { for(Command command : commandMap.keySet()) allReqs.addAll(command.getRequirements()); - addRequirements((Subsystem[]) allReqs.toArray()); + addRequirements(allReqs.toArray(Subsystem[]::new)); } /**