fix casting

This commit is contained in:
66945
2022-03-20 23:04:36 -06:00
parent 80f0f3c76d
commit 28663aa54b
3 changed files with 4 additions and 4 deletions
@@ -383,8 +383,8 @@ public class RobotContainer {
// * CommandChooser with BooleanSuppliers
.whenPressed(new ComplexCommandChooser(new HashMap<Command, BooleanSupplier>() {{
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),
@@ -30,7 +30,7 @@ public class BasicCommandChooser extends CommandBase {
Set<Subsystem> allReqs = c1.getRequirements();
allReqs.addAll(c2.getRequirements());
addRequirements((Subsystem[]) allReqs.toArray());
addRequirements(allReqs.toArray(Subsystem[]::new));
}
public Command getTheChosenOne() {
@@ -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));
}
/**