remember to Tick() the action queue while disabled
Change-Id: I549729b7b6d49fd0aa082362be432d2ebdf3fc31
diff --git a/frc971/joystick_reader.cc b/frc971/joystick_reader.cc
index 9394c05..95f369a 100644
--- a/frc971/joystick_reader.cc
+++ b/frc971/joystick_reader.cc
@@ -400,15 +400,13 @@
fridge_queue.status.FetchLatest();
if (!claw_queue.status.get()) {
LOG(ERROR, "Got no claw status packet.\n");
- // Not safe to continue.
- return;
}
if (!fridge_queue.status.get()) {
LOG(ERROR, "Got no fridge status packet.\n");
- return;
}
- if (claw_queue.status->zeroed && fridge_queue.status->zeroed) {
+ if (claw_queue.status.get() && fridge_queue.status.get() &&
+ claw_queue.status->zeroed && fridge_queue.status->zeroed) {
if (waiting_for_zero_) {
LOG(INFO, "Zeroed! Starting teleop mode.\n");
waiting_for_zero_ = false;
@@ -420,7 +418,6 @@
}
} else {
waiting_for_zero_ = true;
- return;
}
if (!waiting_for_zero_) {
@@ -473,7 +470,7 @@
if (control_loops::claw_queue.status.get()) {
claw_goal_ = control_loops::claw_queue.status->goal_angle;
} else {
- LOG(ERROR, "No fridge status!\n");
+ LOG(ERROR, "No claw status!\n");
}
}
action_queue_.Tick();