Refactor handling of dual intaking
* Add flag to goal message to explicitly indicate which intake we are
requesting, rather than attempting to infer it from the exact settings
of the intake roller speeds.
* While idle, latch the turret to one of the two intaking locations,
chosen based on whichever intake was either last requested or which
intake currently has a ball (if only one has a ball).
* Clean up some of the logic to operate the front/back intakes
independently since we actually have separate transfer rollers for them.
Change-Id: Ib97052a011fe01784077a7b66fccbcc02aa49952
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/y2022/control_loops/superstructure/superstructure_goal.fbs b/y2022/control_loops/superstructure/superstructure_goal.fbs
index 7816563..7227dc2 100644
--- a/y2022/control_loops/superstructure/superstructure_goal.fbs
+++ b/y2022/control_loops/superstructure/superstructure_goal.fbs
@@ -2,6 +2,12 @@
namespace y2022.control_loops.superstructure;
+// Which intake to transfer to the turret from.
+enum RequestedIntake : ubyte {
+ kFront = 0,
+ kBack = 1,
+}
+
table CatapultGoal {
// Old fire flag, only kept for backwards-compatability with logs.
// Use the fire flag in the root Goal instead
@@ -54,6 +60,9 @@
// If true, we started with the ball loaded and should proceed to that state.
preloaded:bool (id: 13);
+
+ // Specifies which intake the turret should move to to intake.
+ turret_intake:RequestedIntake (id: 14);
}