|
10 | 10 | import org.littletonrobotics.junction.Logger;
|
11 | 11 | import org.littletonrobotics.junction.networktables.LoggedDashboardChooser;
|
12 | 12 | import org.littletonrobotics.junction.networktables.LoggedDashboardNumber;
|
| 13 | +import org.littletonrobotics.junction.networktables.LoggedDashboardBoolean; |
13 | 14 |
|
14 | 15 | import com.pathplanner.lib.auto.AutoBuilder;
|
15 | 16 | import com.pathplanner.lib.auto.NamedCommands;
|
@@ -79,7 +80,10 @@ public class RobotContainer {
|
79 | 80 | private LoggedDashboardNumber autoWait = new LoggedDashboardNumber("AutoWait", 0);
|
80 | 81 | private LoggedDashboardNumber rightShooterVolts = new LoggedDashboardNumber("RightShooter", ShooterConstants.SHOOTER_FULL_VOLTAGE);
|
81 | 82 | private LoggedDashboardNumber leftShooterVolts = new LoggedDashboardNumber("LeftShooter", ShooterConstants.SHOOTER_FULL_VOLTAGE);
|
82 |
| - |
| 83 | + private LoggedDashboardBoolean TurboMode = new LoggedDashboardBoolean("Turbo Mode",false); |
| 84 | + private LoggedDashboardBoolean BrakeMode = new LoggedDashboardBoolean("Brake Mode", true); |
| 85 | + private LoggedDashboardBoolean SetStartPosition = new LoggedDashboardBoolean("Set Start Position", false); |
| 86 | + private LoggedDashboardBoolean ShootSide = new LoggedDashboardBoolean("ShootSide", false); |
83 | 87 | // Field
|
84 | 88 | private final Field2d field;
|
85 | 89 |
|
@@ -182,7 +186,7 @@ public RobotContainer() {
|
182 | 186 | Logger.recordOutput("PathPlanner/ActivePath", poses.toArray(new Pose2d[0]));
|
183 | 187 | });
|
184 | 188 |
|
185 |
| - SmartDashboard.putBoolean("Turbo Mode", false); |
| 189 | + |
186 | 190 |
|
187 | 191 | // Named Commands
|
188 | 192 | System.out.println("[Init] Setting up Named Commands");
|
@@ -230,9 +234,7 @@ public RobotContainer() {
|
230 | 234 | configureButtonBindings();
|
231 | 235 |
|
232 | 236 | LookupTuner.setupTuner();
|
233 |
| - SmartDashboard.putBoolean("Brake Mode", true); |
234 |
| - SmartDashboard.putBoolean("Set Start Position", false); |
235 |
| - SmartDashboard.putBoolean("ShootSide", false); // TODO comp fix change later |
| 237 | + |
236 | 238 | }
|
237 | 239 |
|
238 | 240 |
|
@@ -596,16 +598,16 @@ public void LEDPeriodic() {
|
596 | 598 |
|
597 | 599 | public void disabledPeriodic() {
|
598 | 600 | LEDPeriodic();
|
599 |
| - if (SmartDashboard.getBoolean("Brake Mode", true) != brakeMode) { |
| 601 | + if (BrakeMode.get() != brakeMode) { |
600 | 602 | brakeMode = !brakeMode;
|
601 | 603 | pivot.setBrake(brakeMode);
|
602 | 604 | }
|
603 | 605 |
|
604 |
| - if (SmartDashboard.getBoolean("Set Start Position", false)) { |
| 606 | + if (SetStartPosition.get()) { |
605 | 607 | AutoChooser.setupChoosers();
|
606 | 608 | drive.updateDeadzoneChooser();
|
607 | 609 | resetRobotPose(AutoChooser.getStartPose());
|
608 |
| - SmartDashboard.putBoolean("Set Start Position", false); |
| 610 | + SetStartPosition.set(false); |
609 | 611 | }
|
610 | 612 |
|
611 | 613 | setPivotPose3d();
|
|
0 commit comments