11
11
12
12
import edu .wpi .first .wpilibj .Compressor ;
13
13
import edu .wpi .first .wpilibj .GenericHID ;
14
+ import edu .wpi .first .wpilibj .Solenoid ;
14
15
import edu .wpi .first .wpilibj2 .command .Command ;
15
16
import edu .wpi .first .wpilibj2 .command .button .Button ;
16
17
@@ -41,6 +42,8 @@ public class RobotContainer {
41
42
public static PidTuner pidtuner ;
42
43
public static final Chimney chimney = new Chimney ();
43
44
45
+ public static final Solenoid cameraLights = new Solenoid (Constants .Solenoid .CAMERA_LIGHTS );
46
+
44
47
// Operator Inputs
45
48
public static final MayhemDriverStick DRIVER_STICK = new MayhemDriverStick ();
46
49
public static final MayhemDriverPad DRIVER_PAD = new MayhemDriverPad ();
@@ -59,7 +62,9 @@ public RobotContainer() {
59
62
pidtuner = new PidTuner (RobotContainer .DRIVER_STICK .DRIVER_STICK_ENA_BUTTON_SIX ,
60
63
RobotContainer .DRIVER_STICK .DRIVER_STICK_ENA_BUTTON_SEVEN ,
61
64
RobotContainer .DRIVER_STICK .DRIVER_STICK_ENA_BUTTON_ELEVEN ,
62
- RobotContainer .DRIVER_STICK .DRIVER_STICK_ENA_BUTTON_TEN , shooter );
65
+ RobotContainer .DRIVER_STICK .DRIVER_STICK_ENA_BUTTON_TEN , intake );
66
+
67
+ cameraLights .set (true );
63
68
}
64
69
65
70
public static void init () {
@@ -70,6 +75,7 @@ private void configureDefaultCommands() {
70
75
drive .setDefaultCommand (new DriveDefault ());
71
76
// intake.setDefaultCommand(new IntakeExtenderVBus());
72
77
magazine .setDefaultCommand (new MagazineDefault ());
78
+ compressor .setDefaultCommand (new AirCompressorDefault ());
73
79
}
74
80
75
81
private void configureAutonomousPrograms () {
@@ -126,11 +132,25 @@ private void configureDriverPadButtons() {
126
132
// ShooterAdjustWheelVBus(-0.1));
127
133
// DRIVER_PAD.DRIVER_PAD_RED_BUTTON.whenPressed(new ShooterSetWheelVBus(0.0));
128
134
135
+ // Debug Turret
136
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_LEFT.whenPressed(new
137
+ // ShooterSetTurretAbs(-5500));// about -30 degrees
138
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_RIGHT.whenPressed(new
139
+ // ShooterSetTurretAbs(+5500));// about +30 degrees
140
+ DRIVER_PAD .DRIVER_PAD_D_PAD_LEFT .whileHeld (new ShooterSetTurretVBus (-0.2 ));// about -30 degrees
141
+ DRIVER_PAD .DRIVER_PAD_D_PAD_RIGHT .whileHeld (new ShooterSetTurretVBus (+0.2 ));// about +30 degrees
142
+
143
+ // Debug Hood
144
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_UP.whenPressed(new ShooterSetHoodRel(+1000));
145
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_DOWN.whenPressed(new ShooterSetHoodRel(-1000));
146
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_UP.whileHeld(new ShooterSetHoodVBus(+1.0));
147
+ // DRIVER_PAD.DRIVER_PAD_D_PAD_DOWN.whileHeld(new ShooterSetHoodVBus(-1.0));
148
+
129
149
// Debug shooter pid velocity
130
150
DRIVER_PAD .DRIVER_PAD_BLUE_BUTTON .whenPressed (new ShooterAdjustWheel (100.0 ));
131
151
DRIVER_PAD .DRIVER_PAD_GREEN_BUTTON .whenPressed (new ShooterAdjustWheel (-100.0 ));
132
152
DRIVER_PAD .DRIVER_PAD_RED_BUTTON .whenPressed (new ShooterSetWheel (0.0 ));
133
- DRIVER_PAD .DRIVER_PAD_YELLOW_BUTTON .whenPressed (new ShooterSetWheel (4600 ));
153
+ DRIVER_PAD .DRIVER_PAD_YELLOW_BUTTON .whenPressed (new ShooterSetWheel (2700 ));
134
154
135
155
DRIVER_PAD .DRIVER_PAD_LEFT_UPPER_TRIGGER_BUTTON .whileHeld (new ShooterSetFeeder (0.5 ));
136
156
@@ -144,28 +164,37 @@ private void configureOperatorStickButtons() {
144
164
}
145
165
146
166
private void configureOperatorPadButtons () {
147
- // OPERATOR_PAD.OPERATOR_PAD_BUTTON_ONE.whenPressed(new IntakeZero());
148
- // new ShooterAdjustWheel(-100));
167
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_ONE .whenPressed (new MagazineSetTurntable (0.2 ));
149
168
OPERATOR_PAD .OPERATOR_PAD_BUTTON_TWO .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_DOWN ));
150
- // new ShooterSetWheel(0));
151
- // OPERATOR_PAD.OPERATOR_PAD_BUTTON_THREE.whenPressed(new
152
- // IntakeSetPosition(RobotContainer.intake.PIVOT_DOWN));
153
- // new ShooterAdjustWheel(+100));
169
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_THREE .whenPressed (new MagazineSetTurntable (1.0 ));
154
170
OPERATOR_PAD .OPERATOR_PAD_BUTTON_FOUR .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_UP ));
171
+
155
172
// new ShooterSetWheel(1000));
156
173
OPERATOR_PAD .OPERATOR_PAD_BUTTON_FIVE .whileHeld (new ChimneySetChimney (1.0 ));
157
174
OPERATOR_PAD .OPERATOR_PAD_BUTTON_SIX .whileHeld (new IntakeSetRollers (-1.0 ));
158
175
176
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_SEVEN .whileHeld (new TurretAimToTarget ());
177
+
178
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_NINE .whenPressed (new ClimberSetPistons (true ));
179
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_TEN .whenPressed (new ClimberSetPistons (false ));
180
+
159
181
OPERATOR_PAD .OPERATOR_PAD_BUTTON_EIGHT .whileHeld (new IntakeSetRollers (1.0 ));
160
- OPERATOR_PAD .OPERATOR_PAD_D_PAD_UP .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_UP ));
161
- OPERATOR_PAD .OPERATOR_PAD_D_PAD_DOWN .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_DOWN ));
162
- OPERATOR_PAD .OPERATOR_PAD_D_PAD_LEFT .whenPressed (new ShooterSetHood (-0.2 ));
163
- OPERATOR_PAD .OPERATOR_PAD_D_PAD_RIGHT .whenPressed (new ShooterSetHood (-0.2 ));
182
+ // OPERATOR_PAD.OPERATOR_PAD_D_PAD_UP.whenPressed(new
183
+ // IntakeSetPosition(RobotContainer.intake.PIVOT_UP));
184
+ // OPERATOR_PAD.OPERATOR_PAD_D_PAD_DOWN.whenPressed(new
185
+ // IntakeSetPosition(RobotContainer.intake.PIVOT_DOWN));
186
+ OPERATOR_PAD .OPERATOR_PAD_D_PAD_LEFT .whileHeld (new ShooterSetTurretVBus (-0.2 ));
187
+ OPERATOR_PAD .OPERATOR_PAD_D_PAD_RIGHT .whileHeld (new ShooterSetTurretVBus (+0.2 ));
188
+ OPERATOR_PAD .OPERATOR_PAD_D_PAD_UP .whileHeld (new ShooterSetHoodVBus (+1.0 ));
189
+ OPERATOR_PAD .OPERATOR_PAD_D_PAD_DOWN .whileHeld (new ShooterSetHoodVBus (-1.0 ));
164
190
165
191
OPERATOR_PAD .OPERATOR_PAD_RIGHT_Y_AXIS_UP .whileHeld (new ClimberSetWinchesPower (0.7 ));
166
192
OPERATOR_PAD .OPERATOR_PAD_RIGHT_Y_AXIS_DOWN .whileHeld (new ClimberSetWinchesPower (-0.7 ));
167
- OPERATOR_PAD .OPERATOR_PAD_LEFT_Y_AXIS_UP .whenPressed (new ClimberSetPistons (true ));
168
- OPERATOR_PAD .OPERATOR_PAD_LEFT_Y_AXIS_DOWN .whenPressed (new ClimberSetPistons (false ));
193
+
194
+ // OPERATOR_PAD.OPERATOR_PAD_LEFT_Y_AXIS_UP.whenPressed(new
195
+ // MagazineSetTurntable());
196
+ // OPERATOR_PAD.OPERATOR_PAD_LEFT_Y_AXIS_DOWN.whenPressed(new
197
+ // ClimberSetPistons(false));
169
198
}
170
199
171
200
/**
0 commit comments