Remove pivot, end_effector, and rollers from bot3
This is done because the 3rd robot no longer has them on it,
it won't run without removing them in the code.
Signed-off-by: Maxwell Henderson <maxwell.henderson@mailbox.org>
Change-Id: I3154382fd17e1de5167e4bd242c13318dc227179
diff --git a/y2023_bot3/control_loops/superstructure/superstructure.cc b/y2023_bot3/control_loops/superstructure/superstructure.cc
index 6061a76..e77245e 100644
--- a/y2023_bot3/control_loops/superstructure/superstructure.cc
+++ b/y2023_bot3/control_loops/superstructure/superstructure.cc
@@ -23,9 +23,7 @@
const ::std::string &name)
: frc971::controls::ControlLoop<Goal, Position, Status, Output>(event_loop,
name),
- values_(values),
- end_effector_(),
- pivot_joint_(values) {
+ values_(values) {
event_loop->SetRuntimeRealtimePriority(30);
}
@@ -33,41 +31,23 @@
const Position *position,
aos::Sender<Output>::Builder *output,
aos::Sender<Status>::Builder *status) {
- const monotonic_clock::time_point timestamp =
- event_loop()->context().monotonic_event_time;
+ (void)unsafe_goal;
+ (void)position;
if (WasReset()) {
AOS_LOG(ERROR, "WPILib reset, restarting\n");
- end_effector_.Reset();
}
OutputT output_struct;
- end_effector_.RunIteration(
- timestamp,
- unsafe_goal != nullptr ? unsafe_goal->roller_goal() : RollerGoal::IDLE,
- position->end_effector_cube_beam_break(), &output_struct.roller_voltage,
- unsafe_goal != nullptr ? unsafe_goal->preloaded_with_cube() : false);
-
- flatbuffers::Offset<
- frc971::control_loops::PotAndAbsoluteEncoderProfiledJointStatus>
- pivot_joint_offset = pivot_joint_.RunIteration(
- unsafe_goal != nullptr ? unsafe_goal->pivot_goal()
- : PivotGoal::NEUTRAL,
- output != nullptr ? &(output_struct.pivot_joint_voltage) : nullptr,
- position->pivot_joint_position(), status->fbb());
-
Status::Builder status_builder = status->MakeBuilder<Status>();
- status_builder.add_zeroed(pivot_joint_.zeroed());
- status_builder.add_estopped(pivot_joint_.estopped());
- status_builder.add_pivot_joint(pivot_joint_offset);
- status_builder.add_end_effector_state(end_effector_.state());
-
if (output) {
output->CheckOk(output->Send(Output::Pack(*output->fbb(), &output_struct)));
}
+ status_builder.add_zeroed(true);
+
(void)status->Send(status_builder.Finish());
}