update the information about enabled vs not
With the roboRIO, we get different information about whether motors are
enabled (and some about sensors too), so the system for propagating it
around to everything needs to change.
Change-Id: I7e5f9591eeac1fdfe57b271333c3827431fbef01
diff --git a/frc971/control_loops/zeroed_joint.h b/frc971/control_loops/zeroed_joint.h
index e1a256b..f25434f 100644
--- a/frc971/control_loops/zeroed_joint.h
+++ b/frc971/control_loops/zeroed_joint.h
@@ -323,7 +323,7 @@
// Set the goal to here to make it so it doesn't move when disabled.
loop_->R = loop_->X_hat;
// Only progress if we are enabled.
- if (::aos::robot_state->enabled) {
+ if (::aos::joystick_state->enabled) {
if (AnySensorsActive(position)) {
state_ = MOVING_OFF;
} else {
@@ -336,7 +336,7 @@
LOG(DEBUG, "MOVING_OFF\n");
{
// Move off the hall effect sensor.
- if (!::aos::robot_state->enabled) {
+ if (!::aos::joystick_state->enabled) {
// Start over if disabled.
state_ = UNINITIALIZED;
} else if (position && !AnySensorsActive(position)) {
@@ -353,7 +353,7 @@
LOG(DEBUG, "ZEROING\n");
{
int active_sensor_index = ActiveSensorIndex(position);
- if (!::aos::robot_state->enabled) {
+ if (!::aos::joystick_state->enabled) {
// Start over if disabled.
state_ = UNINITIALIZED;
} else if (position && active_sensor_index != -1) {