Made hanging the most important.
Change-Id: I7a379e25ba5e1d7e6c67bfaed6ca78af53fcd398
diff --git a/y2017/joystick_reader.cc b/y2017/joystick_reader.cc
index 7a4bb89..246150f 100644
--- a/y2017/joystick_reader.cc
+++ b/y2017/joystick_reader.cc
@@ -242,6 +242,17 @@
new_superstructure_goal->intake.voltage_rollers = 0.0;
new_superstructure_goal->lights_on = lights_on;
+ if (superstructure_queue.status->intake.position >
+ superstructure_queue.status->intake.unprofiled_goal_position + 0.01) {
+ intake_accumulator_ = 10;
+ }
+ if (intake_accumulator_ > 0) {
+ --intake_accumulator_;
+ if (!superstructure_queue.status->intake.estopped) {
+ new_superstructure_goal->intake.voltage_rollers = 10.0;
+ }
+ }
+
if (data.IsPressed(kHang)) {
new_superstructure_goal->intake.voltage_rollers = -10.0;
new_superstructure_goal->intake.disable_intake = true;
@@ -259,15 +270,6 @@
::std::min(8.0, new_superstructure_goal->intake.voltage_rollers);
}
- if (superstructure_queue.status->intake.position >
- superstructure_queue.status->intake.unprofiled_goal_position + 0.01) {
- intake_accumulator_ = 10;
- }
- if (intake_accumulator_ > 0) {
- --intake_accumulator_;
- new_superstructure_goal->intake.voltage_rollers = 10.0;
- }
-
if (data.IsPressed(kReverseIndexer)) {
new_superstructure_goal->indexer.voltage_rollers = -12.0;
new_superstructure_goal->indexer.angular_velocity = 4.0;