Added forwards and backwards flash lights.
Change-Id: I813aeb1f300115e323d32823fbbca7d01a834d00
diff --git a/y2016/control_loops/shooter/shooter.cc b/y2016/control_loops/shooter/shooter.cc
index 0936eea..629b980 100644
--- a/y2016/control_loops/shooter/shooter.cc
+++ b/y2016/control_loops/shooter/shooter.cc
@@ -84,7 +84,17 @@
// Turn the lights on if we are supposed to spin.
if (output) {
- if (::std::abs(goal->angular_velocity) > 0.0 || goal->force_lights_on) {
+ if (::std::abs(goal->angular_velocity) > 0.0) {
+ output->lights_on = true;
+ if (goal->shooting_forwards) {
+ output->forwards_flashlight = true;
+ output->backwards_flashlight = false;
+ } else {
+ output->forwards_flashlight = false;
+ output->backwards_flashlight = true;
+ }
+ }
+ if (goal->force_lights_on) {
output->lights_on = true;
}
}