added defaults

This commit is contained in:
66945
2023-02-25 21:04:40 -07:00
parent cdefdda364
commit 94f38856d1
2 changed files with 14 additions and 14 deletions
+13 -13
View File
@@ -69,17 +69,17 @@ public class RobotContainer {
private Command noAuto = new InstantCommand();
private Command balance = new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive);
// private Command balance = new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive);
private Command blue1Path = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt");
private Command blue1PathWithBalance = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt").andThen(new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive));
// private Command blue1Path = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt");
// private Command blue1PathWithBalance = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt").andThen(new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive));
private Command red1Path = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt", -1);
private Command red1PathWithBalance = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt", -1).andThen(new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive));
// private Command red1Path = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt", -1);
// private Command red1PathWithBalance = new JoystickPlayback(m_robotSwerveDrive, "Blue1Path.txt", -1).andThen(new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive));
private Command taxi = new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt");
// private Command taxi = new JoystickPlayback(m_robotSwerveDrive, "Taxi.txt");
PlaybackChooser playbackChooser;
private PlaybackChooser playbackChooser;
/**
* The container for the robot. Contains subsystems, OI devices, and commands.
*/
@@ -95,15 +95,15 @@ public class RobotContainer {
.withName("SwerveDrive DefaultCommand"));
// * Auto Commands
chooser.setDefaultOption("NoAuto", noAuto);
// chooser.setDefaultOption("NoAuto", noAuto);
chooser.addOption("Blue1Path", blue1Path);
chooser.addOption("Blue1PathWithBalance", blue1PathWithBalance);
// chooser.addOption("Blue1Path", blue1Path);
// chooser.addOption("Blue1PathWithBalance", blue1PathWithBalance);
chooser.addOption("Red1Path", red1Path);
chooser.addOption("Red1PathWithBalance", red1PathWithBalance);
// chooser.addOption("Red1Path", red1Path);
// chooser.addOption("Red1PathWithBalance", red1PathWithBalance);
chooser.addOption("Taxi", taxi);
// chooser.addOption("Taxi", taxi);
playbackChooser = new PlaybackChooser(m_robotSwerveDrive,
"Balance", new AutoBalance(m_robotMap.gyro, m_robotSwerveDrive));
@@ -47,13 +47,13 @@ public class PlaybackChooser {
public void appendCommand() {
var chooser = new SendableChooser<Command>();
chooser.setDefaultOption("No Auto", m_noAuto);
for (String auto : m_dir.list()) {
m_playback.addOption(auto, new JoystickPlayback(m_swerve, auto));
}
for (var cmd_name : m_commandPool.keySet()) {
chooser.addOption(cmd_name, m_commandPool.get(cmd_name));
}
chooser.addOption("No Auto", m_noAuto);
m_choosers.add(chooser);
Shuffleboard.getTab("Auto Chooser")