Added forwards and backwards flash lights.
Change-Id: I813aeb1f300115e323d32823fbbca7d01a834d00
diff --git a/y2016/wpilib/wpilib_interface.cc b/y2016/wpilib/wpilib_interface.cc
index d169b42..b3ed0a8 100644
--- a/y2016/wpilib/wpilib_interface.cc
+++ b/y2016/wpilib/wpilib_interface.cc
@@ -499,7 +499,19 @@
shooter_clamp_->Set(shooter_->clamp_open);
shooter_pusher_->Set(shooter_->push_to_shooter);
lights_->Set(shooter_->lights_on);
- flashlight_->Set(shooter_->lights_on ? Relay::kForward : Relay::kOff);
+ if (shooter_->forwards_flashlight) {
+ if (shooter_->backwards_flashlight) {
+ flashlight_->Set(Relay::kOn);
+ } else {
+ flashlight_->Set(Relay::kReverse);
+ }
+ } else {
+ if (shooter_->backwards_flashlight) {
+ flashlight_->Set(Relay::kForward);
+ } else {
+ flashlight_->Set(Relay::kOff);
+ }
+ }
}
}