added a spit out button
diff --git a/frc971/input/JoystickReader.cc b/frc971/input/JoystickReader.cc
index ce9b6ac..be4e188 100644
--- a/frc971/input/JoystickReader.cc
+++ b/frc971/input/JoystickReader.cc
@@ -52,6 +52,7 @@
const ButtonLocation kIntake(3, 10);
const ButtonLocation kForceFire(3, 12);
const ButtonLocation kForceIndexUp(3, 9), kForceIndexDown(3, 7);
+const ButtonLocation kForceSpitOut(2, 11);
const ButtonLocation kDeployHangers(3, 1);
@@ -228,7 +229,9 @@
const bool index_up = data.IsPressed(kForceIndexUp);
const bool index_down = data.IsPressed(kForceIndexDown);
- index_goal->override_index = index_up || index_down;
+ const bool spit_out = data.IsPressed(kForceSpitOut);
+ index_goal->override_index = index_up || index_down || spit_out;
+ index_goal->override_transfer = spit_out;
if (index_up && index_down) {
index_goal->index_voltage = 0.0;
} else if (index_up) {
@@ -236,6 +239,10 @@
} else if (index_down) {
index_goal->index_voltage = -12.0;
}
+ if (spit_out) {
+ index_goal->index_voltage = -12.0;
+ index_goal->transfer_voltage = -12.0;
+ }
index_goal.Send();
shooter_goal.Send();