Move Position, robot_state, and joystick_state over
ControlLoop should now be completely using the event loop.
Change-Id: Ifb936c384d1031abbc9e61d834b1ef157ad0841c
diff --git a/y2014/control_loops/shooter/shooter.cc b/y2014/control_loops/shooter/shooter.cc
index f61cc02..7f3a3b0 100644
--- a/y2014/control_loops/shooter/shooter.cc
+++ b/y2014/control_loops/shooter/shooter.cc
@@ -249,8 +249,7 @@
// Don't even let the control loops run.
bool shooter_loop_disable = false;
- const bool disabled =
- !::aos::joystick_state.get() || !::aos::joystick_state->enabled;
+ const bool disabled = !has_joystick_state() || !joystick_state().enabled;
// If true, move the goal if we saturate.
bool cap_goal = false;
@@ -549,7 +548,7 @@
shooter_.absolute_position()) > 0.0005 &&
cycles_not_moved_ > 6) ||
monotonic_clock::now() > shot_end_time_) &&
- ::aos::robot_state->voltage_battery > 10.5) {
+ robot_state().voltage_battery > 10.5) {
state_ = STATE_REQUEST_LOAD;
++shot_count_;
}