mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-08 16:28:00 -06:00
chooser moved to Robot.java
This commit is contained in:
@@ -13,6 +13,7 @@ import java.io.PrintWriter;
|
||||
|
||||
import edu.wpi.first.wpilibj.DriverStation;
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import frc4388.utility.RobotTime;
|
||||
@@ -41,7 +42,7 @@ public class Robot extends TimedRobot {
|
||||
// autonomous chooser on the dashboard.
|
||||
m_robotContainer = new RobotContainer();
|
||||
|
||||
|
||||
SmartDashboard.putData("AutoPlayback Chooser", m_robotContainer.chooser);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +71,8 @@ public class Robot extends TimedRobot {
|
||||
@Override
|
||||
public void disabledInit() {
|
||||
m_robotTime.endMatchTime();
|
||||
|
||||
SmartDashboard.putData("AutoPlayback Chooser", m_robotContainer.chooser);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,7 +64,7 @@ public class RobotContainer {
|
||||
private final DeadbandedXboxController m_operatorXbox = new DeadbandedXboxController(OIConstants.XBOX_OPERATOR_ID);
|
||||
|
||||
/* Autos */
|
||||
private SendableChooser<Command> chooser = new SendableChooser<>();
|
||||
public SendableChooser<Command> chooser = new SendableChooser<>();
|
||||
|
||||
private Command noAuto = new InstantCommand();
|
||||
|
||||
@@ -102,8 +102,6 @@ public class RobotContainer {
|
||||
chooser.addOption("Red1PathWithBalance", red1PathWithBalance);
|
||||
|
||||
chooser.addOption("Taxi", taxi);
|
||||
|
||||
SmartDashboard.putData(chooser);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,8 +132,8 @@ public class RobotContainer {
|
||||
"Blue1Path.txt"))
|
||||
.onFalse(new InstantCommand());
|
||||
|
||||
new JoystickButton(getDeadbandedDriverController(), XboxController.LEFT_BUMPER_BUTTON)
|
||||
.onTrue(new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt"));
|
||||
// new JoystickButton(getDeadbandedDriverController(), XboxController.LEFT_BUMPER_BUTTON)
|
||||
// .onTrue(new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt"));
|
||||
|
||||
// * Operator Buttons
|
||||
}
|
||||
@@ -148,7 +146,6 @@ public class RobotContainer {
|
||||
public Command getAutonomousCommand() {
|
||||
|
||||
return chooser.getSelected();
|
||||
// return new InstantCommand();
|
||||
}
|
||||
|
||||
public DeadbandedXboxController getDeadbandedDriverController() {
|
||||
|
||||
Reference in New Issue
Block a user