Skip to content

Commit ca26712

Browse files
committed
Add lights color to smartdashboard
1 parent e77aad3 commit ca26712

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • Robot2019/src/main/java/frc/robot/subsystems

Robot2019/src/main/java/frc/robot/subsystems/Lights.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import edu.wpi.first.wpilibj.VictorSP;
1111
import edu.wpi.first.wpilibj.command.Subsystem;
12+
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
1213
import frc.robot.commands.SetLight;
1314

1415
/**
@@ -30,6 +31,15 @@ public Lights(VictorSP lights) {
3031

3132
public void setLights() {
3233
lights.set(lightsValue);
34+
String color;
35+
if (lightsValue == 0) {
36+
color = "None";
37+
} else if (lightsValue == 0.5) {
38+
color = "Yellow";
39+
} else {
40+
color = "Orange";
41+
}
42+
SmartDashboard.putString("Lights Current Color", color);
3343
}
3444

3545
public void toggleLights() {

0 commit comments

Comments
 (0)