Added RGB lights.

Change-Id: Ibc4438acd7c678ebf2ed7c621875d9c6364637d1
diff --git a/y2017/control_loops/superstructure/superstructure.cc b/y2017/control_loops/superstructure/superstructure.cc
index 357c4b6..2a04ef4 100644
--- a/y2017/control_loops/superstructure/superstructure.cc
+++ b/y2017/control_loops/superstructure/superstructure.cc
@@ -96,6 +96,12 @@
                   output != nullptr ? &(output->voltage_turret) : nullptr,
                   &(status->indexer), &(status->turret), &intake_);
 
+  status->estopped =
+      status->intake.estopped | status->hood.estopped | status->turret.estopped;
+
+  status->zeroed =
+      status->intake.zeroed && status->hood.zeroed && status->turret.zeroed;
+
   if (output && unsafe_goal) {
     output->voltage_intake_rollers =
         ::std::max(-kMaxIntakeRollerVoltage,
@@ -108,6 +114,20 @@
 
     // Set the lights on or off
     output->lights_on = unsafe_goal->lights_on;
+
+    if (status->estopped) {
+      output->red_light_on = true;
+      output->green_light_on = false;
+      output->blue_light_on = false;
+    } else if (status->turret.vision_tracking) {
+      output->red_light_on = false;
+      output->green_light_on = true;
+      output->blue_light_on = false;
+    } else if (!status->zeroed) {
+      output->red_light_on = false;
+      output->green_light_on = false;
+      output->blue_light_on = true;
+    }
   }
 }