Skip to content

Commit

Permalink
setDefaultCommand is at rest
Browse files Browse the repository at this point in the history
  • Loading branch information
etangent committed Jan 20, 2025
1 parent 263c4c2 commit 8326bf9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"/FMSInfo": "FMSInfo",
"/Faults/Active Faults": "Alerts",
"/Faults/Total Faults": "Alerts",
"/Faults/Active Faults": "Alerts",
"/Faults/Total Faults": "Alerts",
"/Robot/autos": "String Chooser",
"/Robot/drive/field2d": "Field2d",
"/Robot/drive/frontLeft/driveFeedback": "PIDController",
Expand All @@ -33,6 +31,10 @@
"/Robot/drive/rearRight/turnFeedback": "PIDController",
"/Robot/drive/rotationController": "PIDController",
"/Robot/drive/translationController": "ProfiledPIDController",
"/Robot/elevator/measurement/mech": "Mechanism2d",
"/Robot/elevator/pid": "ProfiledPIDController",
"/Robot/elevator/setpoint/mech": "Mechanism2d",
"/SmartDashboard/Alerts": "Alerts",
"/SmartDashboard/Scheduler": "Scheduler",
"/SmartDashboard/VisionSystemSim-main/Sim Field": "Field2d",
"/SmartDashboard/drive dynamic backward": "Command",
Expand Down Expand Up @@ -200,7 +202,7 @@
0.0,
0.8500000238418579
],
"height": 140,
"height": 405,
"series": [
{
"color": [
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/sciborgs1155/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ private void configureBindings() {
drive.setDefaultCommand(drive.drive(x, y, omega));
led.setDefaultCommand(led.scrolling());

elevator.setDefaultCommand(elevator.retract());

autonomous().whileTrue(Commands.defer(autos::getSelected, Set.of(drive)).asProxy());
autonomous().whileTrue(led.autos());

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/sciborgs1155/robot/elevator/Elevator.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public Elevator(ElevatorIO hardware) {
pid.reset(hardware.position());
pid.setGoal(MIN_HEIGHT.in(Meters));

setDefaultCommand(retract());

sysIdRoutine =
new SysIdRoutine(
new SysIdRoutine.Config(),
Expand Down

0 comments on commit 8326bf9

Please sign in to comment.