17
17
import frc .robot .superstructure .SuperstructureState ;
18
18
import frc .robot .swerve .Swerve ;
19
19
20
- /** Initializes subsystems and commands . */
20
+ /** Robot container . */
21
21
public class RobotContainer {
22
22
23
- /** Instance variable for the robot container singleton. */
23
+ /** Robot container singleton. */
24
24
public static RobotContainer instance = null ;
25
25
26
+ /** Arm subsystem reference. */
26
27
private final Arm arm ;
28
+
29
+ /** Auto subsystem reference. */
27
30
private final Auto auto ;
31
+
32
+ /** Intake subsystem reference. */
28
33
private final Intake intake ;
34
+
35
+ /** Odometry subsystem reference. */
29
36
private final Odometry odometry ;
37
+
38
+ /** Shooter subsystem reference. */
30
39
private final Shooter shooter ;
40
+
41
+ /** Superstructure subsystem reference. */
31
42
private final Superstructure superstructure ;
43
+
44
+ /** Swerve subsystem reference. */
32
45
private final Swerve swerve ;
33
46
34
- private final CommandXboxController driverController , operatorController ;
47
+ /** Driver controller. */
48
+ private final CommandXboxController driverController ;
49
+
50
+ /** Operator controller. */
51
+ private final CommandXboxController operatorController ;
35
52
53
+ /** Rumble controller. Use the same port as the operator controller to vibrate the operator controller. */
36
54
private final XboxController rumbleController ;
37
55
38
- /** Creates a new instance of the robot container. */
56
+ /** Initializes the robot container. */
39
57
private RobotContainer () {
40
58
arm = Arm .getInstance ();
41
59
auto = Auto .getInstance ();
@@ -46,6 +64,7 @@ private RobotContainer() {
46
64
swerve = Swerve .getInstance ();
47
65
48
66
driverController = new CommandXboxController (0 );
67
+
49
68
operatorController = new CommandXboxController (1 );
50
69
rumbleController = new XboxController (1 );
51
70
@@ -55,9 +74,9 @@ private RobotContainer() {
55
74
}
56
75
57
76
/**
58
- * Gets the instance of the robot container.
77
+ * Returns the robot container.
59
78
*
60
- * @return the instance of the robot container.
79
+ * @return the robot container.
61
80
*/
62
81
public static RobotContainer getInstance () {
63
82
if (instance == null ) {
@@ -101,6 +120,12 @@ private void configureBindings() {
101
120
shooter .serializedNote ().whileTrue (rumble (RumbleType .kRightRumble ));
102
121
}
103
122
123
+ /**
124
+ * Rumbles the controller.
125
+ *
126
+ * @param side the side of the controller to rumble.
127
+ * @return a command that rumbles the controller.
128
+ */
104
129
public Command rumble (RumbleType side ) {
105
130
return Commands .startEnd (
106
131
() -> rumbleController .setRumble (side , 1 ), () -> rumbleController .setRumble (side , 0 ));
0 commit comments