Skip to content

Commit

Permalink
changed wait time be a preference value
Browse files Browse the repository at this point in the history
  • Loading branch information
rflood07 committed Feb 2, 2024
1 parent 37acb04 commit b6b9546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,14 @@ public class RobotContainer {

/** The container for the robot. Contains subsystems, OI devices, and commands. */
public RobotContainer() {
//preferences are initialized IF they don't already exist on the Rio
//preferences are initialized IF they don't already exist on the Rio
Preferences.initBoolean("Intake", false);
Preferences.initBoolean("Climber", false);
Preferences.initBoolean("Shooter", false);
Preferences.initBoolean("Lights", false);
Preferences.initBoolean("Indexer", false);
Preferences.initBoolean("Detector Limelight", false);
Preferences.initDouble("wait # of seconds", 0);

driverController = new PS4Controller(DRIVE_CONTROLLER_ID);
operatorController = new PS4Controller(OPERATOR_CONTROLLER_ID);
Expand Down Expand Up @@ -304,8 +305,7 @@ private void registerNamedCommands() {
if(intakeExists) {
NamedCommands.registerCommand("intakeOn", new InstantCommand(()-> intake.intakeYes(1)));
}
NamedCommands.registerCommand("wait x seconds", new WaitCommand(SmartDashboard.getNumber("wait # of seconds", 0)));

NamedCommands.registerCommand("wait x seconds", new WaitCommand(Preferences.getDouble("wait # of seconds", 0)));
}

public void teleopPeriodic() {
Expand Down

0 comments on commit b6b9546

Please sign in to comment.