changed some of the status light settings
Change-Id: I5601c2619700f877471d476d857cfd52b6575647
diff --git a/y2019/control_loops/superstructure/superstructure.cc b/y2019/control_loops/superstructure/superstructure.cc
index dd332b8..f62ba37 100644
--- a/y2019/control_loops/superstructure/superstructure.cc
+++ b/y2019/control_loops/superstructure/superstructure.cc
@@ -96,13 +96,16 @@
// Light Logic
if (status->estopped) {
// Estop is red
- SendColors(0.5, 0.0, 0.0);
- } else if (unsafe_goal->suction.gamepiece_mode == 0) {
- // Ball mode is blue
- SendColors(0.0, 0.0, 0.5);
- } else if (unsafe_goal->suction.gamepiece_mode == 1) {
- // Disk mode is yellow
- SendColors(0.5, 0.5, 0.0);
+ SendColors(1.0, 0.0, 0.0);
+ } else if (status->has_piece) {
+ // Having suction is green
+ SendColors(0.0, 1.0, 0.0);
+ } else if (unsafe_goal->suction.gamepiece_mode == 0 && !status->has_piece) {
+ // Ball mode is orange
+ SendColors(1.0, 0.1, 0.0);
+ } else if (unsafe_goal->suction.gamepiece_mode == 1 && !status->has_piece) {
+ // Disk mode is deep blue
+ SendColors(0.05, 0.1, 0.5);
} else {
SendColors(0.0, 0.0, 0.0);
}
diff --git a/y2019/wpilib_interface.cc b/y2019/wpilib_interface.cc
index 2a21274..fd9df73 100644
--- a/y2019/wpilib_interface.cc
+++ b/y2019/wpilib_interface.cc
@@ -563,20 +563,20 @@
time_since_last_send = 0;
}
if (status_light.green != last_green_ || time_since_last_send == 0) {
- canifier_.SetLEDOutput(1.0 - status_light.green,
- ::ctre::phoenix::CANifier::LEDChannelB);
+ canifier_.SetLEDOutput(status_light.green,
+ ::ctre::phoenix::CANifier::LEDChannelA);
last_green_ = status_light.green;
}
if (status_light.blue != last_blue_ || time_since_last_send == 0) {
- canifier_.SetLEDOutput(1.0 - status_light.blue,
- ::ctre::phoenix::CANifier::LEDChannelA);
+ canifier_.SetLEDOutput(status_light.blue,
+ ::ctre::phoenix::CANifier::LEDChannelC);
last_blue_ = status_light.blue;
}
if (status_light.red != last_red_ || time_since_last_send == 0) {
- canifier_.SetLEDOutput(1.0 - status_light.red,
- ::ctre::phoenix::CANifier::LEDChannelC);
+ canifier_.SetLEDOutput(status_light.red,
+ ::ctre::phoenix::CANifier::LEDChannelB);
last_red_ = status_light.red;
}
}