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/drivetrain/drivetrain.cc b/frc971/control_loops/drivetrain/drivetrain.cc
index c88169a..395f8b9 100644
--- a/frc971/control_loops/drivetrain/drivetrain.cc
+++ b/frc971/control_loops/drivetrain/drivetrain.cc
@@ -630,7 +630,7 @@
loop_->mutable_U(1, 0) = ::aos::Clip(
(R_right / Kv)(0, 0) + (IsInGear(right_gear_) ? 0 : wiggle),
-12.0, 12.0);
- loop_->mutable_U() *= 12.0 / position_.battery_voltage;
+ loop_->mutable_U() *= 12.0 / ::aos::robot_state->voltage_battery;
#endif
}
}
diff --git a/frc971/control_loops/drivetrain/drivetrain.q b/frc971/control_loops/drivetrain/drivetrain.q
index ea1324d..5f34e92 100644
--- a/frc971/control_loops/drivetrain/drivetrain.q
+++ b/frc971/control_loops/drivetrain/drivetrain.q
@@ -39,7 +39,6 @@
double right_encoder;
//double left_shifter_position;
//double right_shifter_position;
- double battery_voltage;
};
message Output {