File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ public class RobotContainer {
115
115
private HelixJoysticks joysticks ;
116
116
private HelixJoysticks op_joysticks ;
117
117
118
+ private boolean limelightEnabled ; // Whether the Limelight LEDs have been turned on.
119
+
118
120
/**
119
121
* The container for the robot. Contains subsystems, OI devices, and commands.
120
122
*/
@@ -206,11 +208,17 @@ public void moveHoodToHardStop() {
206
208
}
207
209
208
210
public void enableLights () {
209
- mLimelight .turnOnLEDs ();
211
+ if (!limelightEnabled ) {
212
+ mLimelight .turnOnLEDs ();
213
+ limelightEnabled = true ;
214
+ }
210
215
}
211
216
212
217
public void disableLights () {
213
- mLimelight .turnOffLEDs ();
218
+ if (limelightEnabled ) {
219
+ mLimelight .turnOffLEDs ();
220
+ limelightEnabled = false ;
221
+ }
214
222
}
215
223
216
224
public void configureButtonBindings () {
You can’t perform that action at this time.
0 commit comments