Skip to content

Commit 04d9f6d

Browse files
committed
2 parents 614b9be + 3c991fc commit 04d9f6d

File tree

4 files changed

+72
-64
lines changed

4 files changed

+72
-64
lines changed

simgui-ds.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@
77
"keyboardJoysticks": [
88
{
99
"axisConfig": [
10-
{
11-
"decKey": 65,
12-
"incKey": 68
13-
},
1410
{
1511
"decKey": 87,
1612
"incKey": 83
1713
},
1814
{
19-
"decKey": 69,
20-
"decayRate": 0.0,
21-
"incKey": 82,
22-
"keyRate": 0.009999999776482582
15+
"decKey": 68,
16+
"incKey": 65
2317
},
2418
{
25-
"decKey": 75,
26-
"incKey": 76
19+
"decayRate": 0.0
2720
}
2821
],
29-
"axisCount": 5,
22+
"axisCount": 4,
3023
"buttonCount": 4,
3124
"buttonKeys": [
3225
90,
@@ -60,7 +53,7 @@
6053
"axisCount": 2,
6154
"buttonCount": 4,
6255
"buttonKeys": [
63-
77,
56+
-1,
6457
44,
6558
46,
6659
47

simgui-window.json

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,83 @@
66
"GLOBAL": {
77
"font": "Proggy Dotted",
88
"fps": "120",
9-
"height": "720",
10-
"maximized": "0",
9+
"height": "1009",
10+
"maximized": "1",
1111
"style": "0",
1212
"userScale": "2",
13-
"width": "1280",
14-
"xpos": "193",
15-
"ypos": "106"
13+
"width": "1920",
14+
"xpos": "0",
15+
"ypos": "23"
16+
}
17+
},
18+
"Table": {
19+
"0xE56EC1C2,4": {
20+
"Column 0 Weight": "1.0000",
21+
"Column 1 Weight": "1.0000",
22+
"Column 2 Weight": "1.0000",
23+
"Column 3 Weight": "1.0000"
1624
}
1725
},
1826
"Window": {
1927
"###/FMSInfo": {
2028
"Collapsed": "0",
21-
"Pos": "60,60",
22-
"Size": "181,167"
29+
"Pos": "25,555",
30+
"Size": "175,167"
31+
},
32+
"###/SmartDashboard/Auto Chooser": {
33+
"Collapsed": "0",
34+
"Pos": "243,569",
35+
"Size": "254,54"
2336
},
2437
"###/SmartDashboard/Field": {
2538
"Collapsed": "0",
2639
"Pos": "166,24",
27-
"Size": "740,373"
40+
"Size": "1096,496"
2841
},
2942
"###FMS": {
3043
"Collapsed": "0",
31-
"Pos": "4,414",
32-
"Size": "169,184"
44+
"Pos": "3,739",
45+
"Size": "175,184"
3346
},
3447
"###Joysticks": {
3548
"Collapsed": "0",
36-
"Pos": "250,465",
37-
"Size": "796,189"
49+
"Pos": "494,724",
50+
"Size": "796,172"
3851
},
3952
"###Keyboard 0 Settings": {
4053
"Collapsed": "0",
41-
"Pos": "369,59",
42-
"Size": "300,560"
54+
"Pos": "1313,274",
55+
"Size": "300,726"
4356
},
4457
"###NetworkTables": {
4558
"Collapsed": "0",
46-
"Pos": "399,253",
47-
"Size": "750,236"
59+
"Pos": "1290,21",
60+
"Size": "613,175"
4861
},
4962
"###NetworkTables Info": {
50-
"Collapsed": "1",
51-
"Pos": "250,129",
63+
"Collapsed": "0",
64+
"Pos": "507,566",
5265
"Size": "750,145"
5366
},
5467
"###Other Devices": {
55-
"Collapsed": "0",
56-
"Pos": "1025,20",
68+
"Collapsed": "1",
69+
"Pos": "1633,914",
5770
"Size": "250,695"
5871
},
72+
"###RoboRIO": {
73+
"Collapsed": "0",
74+
"Pos": "1650,212",
75+
"Size": "119,146"
76+
},
5977
"###System Joysticks": {
6078
"Collapsed": "0",
61-
"Pos": "205,308",
79+
"Pos": "288,723",
6280
"Size": "192,218"
6381
},
6482
"###Timing": {
6583
"Collapsed": "0",
66-
"Pos": "5,150",
67-
"Size": "135,219"
84+
"Pos": "19,364",
85+
"Size": "135,173"
6886
},
6987
"Debug##Default": {
7088
"Collapsed": "0",
@@ -73,8 +91,8 @@
7391
},
7492
"Robot State": {
7593
"Collapsed": "0",
76-
"Pos": "7,20",
77-
"Size": "92,116"
94+
"Pos": "7,21",
95+
"Size": "99,116"
7896
}
7997
}
8098
}

simgui.json

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11
{
22
"HALProvider": {
33
"Other Devices": {
4-
"SPARK MAX [2]": {
5-
"header": {
6-
"open": true
7-
}
8-
},
9-
"SPARK MAX [4]": {
10-
"header": {
11-
"open": true
12-
}
13-
},
14-
"SPARK MAX [5]": {
15-
"header": {
16-
"open": true
17-
}
18-
},
19-
"SPARK MAX [7]": {
20-
"header": {
21-
"open": true
22-
}
23-
},
244
"Talon FX (v6)[2]/Rotor Sensor": {
255
"header": {
266
"open": true
@@ -60,11 +40,14 @@
6040
"/LiveWindow/Ungrouped/PIDController[1]": "PIDController",
6141
"/LiveWindow/Ungrouped/Pigeon 2 [13]": "Gyro",
6242
"/LiveWindow/Ungrouped/Scheduler": "Scheduler",
43+
"/SmartDashboard/Alerts": "Alerts",
44+
"/SmartDashboard/Auto Chooser": "String Chooser",
6345
"/SmartDashboard/Encoders": "Alerts",
6446
"/SmartDashboard/Field": "Field2d",
6547
"/SmartDashboard/IMU": "Alerts",
6648
"/SmartDashboard/JSON": "Alerts",
6749
"/SmartDashboard/Motors": "Alerts",
50+
"/SmartDashboard/PathPlanner": "Alerts",
6851
"/SmartDashboard/Pigeon 2 (v6) [13]": "Gyro",
6952
"/SmartDashboard/Pigeon 2 [13]": "Gyro",
7053
"/SmartDashboard/SendableChooser[0]": "String Chooser",
@@ -79,6 +62,11 @@
7962
"visible": true
8063
}
8164
},
65+
"/SmartDashboard/Auto Chooser": {
66+
"window": {
67+
"visible": true
68+
}
69+
},
8270
"/SmartDashboard/Field": {
8371
"OdometryPose": {
8472
"arrowColor": [
@@ -105,12 +93,12 @@
10593
"arrowWeight": 3.0,
10694
"style": "Hidden"
10795
},
108-
"bottom": 1476,
109-
"height": 8.210550308227539,
110-
"left": 150,
111-
"right": 2961,
112-
"top": 79,
113-
"width": 16.541748046875,
96+
"bottom": 1638,
97+
"height": 8.051901817321777,
98+
"left": 534,
99+
"right": 3466,
100+
"top": 291,
101+
"width": 17.54825210571289,
114102
"window": {
115103
"visible": true
116104
}

src/main/java/frc/robot/RobotContainer.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
package frc.robot;
66

7+
import com.pathplanner.lib.auto.AutoBuilder;
78
import com.pathplanner.lib.auto.NamedCommands;
89
import edu.wpi.first.math.controller.ProfiledPIDController;
910
import edu.wpi.first.math.geometry.Pose2d;
@@ -14,6 +15,8 @@
1415
import edu.wpi.first.wpilibj.DriverStation;
1516
import edu.wpi.first.wpilibj.Filesystem;
1617
import edu.wpi.first.wpilibj.RobotBase;
18+
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
19+
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
1720
import edu.wpi.first.wpilibj2.command.Command;
1821
import edu.wpi.first.wpilibj2.command.Commands;
1922
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
@@ -32,6 +35,8 @@ public class RobotContainer
3235
private final SwerveSubsystem drivebase = new SwerveSubsystem(new File(Filesystem.getDeployDirectory(),
3336
"swerve"));
3437

38+
private final SendableChooser<Command> autoChooser;
39+
3540
/**
3641
* Converts driver input into a field-relative ChassisSpeeds that is controlled by angular velocity.
3742
*/
@@ -94,6 +99,9 @@ public RobotContainer()
9499
configureBindings();
95100
DriverStation.silenceJoystickConnectionWarning(true);
96101
NamedCommands.registerCommand("test", Commands.print("I EXIST"));
102+
103+
autoChooser = AutoBuilder.buildAutoChooser("TestAuto");
104+
SmartDashboard.putData("Auto Chooser", autoChooser);
97105
}
98106

99107
/**
@@ -180,7 +188,8 @@ private void configureBindings()
180188
public Command getAutonomousCommand()
181189
{
182190
// An example command will be run in autonomous
183-
return drivebase.getAutonomousCommand("TestAuto");
191+
//return drivebase.getAutonomousCommand("TestAuto");
192+
return autoChooser.getSelected();
184193
}
185194

186195
public void setMotorBrake(boolean brake)

0 commit comments

Comments
 (0)