Turn lights on when button is pushed
Finished.
Change-Id: I53880c31a5d46499b7875e154bae9b5b7716091c
diff --git a/y2017/joystick_reader.cc b/y2017/joystick_reader.cc
index 9cee19f..4d3355f 100644
--- a/y2017/joystick_reader.cc
+++ b/y2017/joystick_reader.cc
@@ -111,6 +111,7 @@
void HandleTeleop(const ::aos::input::driver_station::Data &data) {
// Default the intake to in.
intake_goal_ = constants::Values::kIntakeRange.lower;
+ bool lights_on = false;
if (!data.GetControlBit(ControlBit::kEnabled)) {
action_queue_.CancelAllActions();
@@ -130,6 +131,7 @@
if (data.IsPressed(kVisionAlign)) {
// Align shot using vision
// TODO(campbell): Add vision aligning.
+ lights_on = true;
shooter_velocity_ = 100.0;
} else if (data.IsPressed(kCloseShot)) {
// Close shot
@@ -176,6 +178,7 @@
new_superstructure_goal->hood.profile_params.max_acceleration = 25.0;
new_superstructure_goal->intake.voltage_rollers = 0.0;
+ new_superstructure_goal->lights_on = lights_on;
if (data.IsPressed(kHang)) {
new_superstructure_goal->intake.voltage_rollers = -12.0;