Make climber buttons work
Change-Id: Ia6d83928c0dbaa557fc02050bcdaf6b3b2d2d764
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
diff --git a/y2020/control_loops/superstructure/superstructure.cc b/y2020/control_loops/superstructure/superstructure.cc
index 1a61a29..86dcbb1 100644
--- a/y2020/control_loops/superstructure/superstructure.cc
+++ b/y2020/control_loops/superstructure/superstructure.cc
@@ -158,8 +158,6 @@
position->shooter(), status->fbb(),
output != nullptr ? &(output_struct) : nullptr, position_timestamp);
- climber_.Iterate(unsafe_goal, output != nullptr ? &(output_struct) : nullptr);
-
const AbsoluteAndAbsoluteEncoderProfiledJointStatus *const hood_status =
GetMutableTemporaryPointer(*status->fbb(), hood_status_offset);
@@ -237,6 +235,9 @@
output_struct.feeder_voltage = 0.0;
output_struct.intake_roller_voltage = 0.0;
if (unsafe_goal) {
+ output_struct.climber_voltage =
+ std::clamp(unsafe_goal->climber_voltage(), -12.0f, 12.0f);
+
if (unsafe_goal->shooting() || unsafe_goal->intake_preloading()) {
preloading_timeout_ = position_timestamp + kPreloadingTimeout;
}