Add TargetSelectorHint channel
Change-Id: Icd9cd061a25bcbe8c1ade786a714bc66799f1831
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/y2023/BUILD b/y2023/BUILD
index dc5e708..f772caa 100644
--- a/y2023/BUILD
+++ b/y2023/BUILD
@@ -185,6 +185,7 @@
"//aos/network:timestamp_fbs",
"//y2019/control_loops/drivetrain:target_selector_fbs",
"//y2023/control_loops/superstructure:superstructure_goal_fbs",
+ "//y2023/control_loops/drivetrain:target_selector_hint_fbs",
"//y2023/control_loops/drivetrain:drivetrain_can_position_fbs",
"//y2023/control_loops/superstructure:superstructure_output_fbs",
"//y2023/control_loops/superstructure:superstructure_position_fbs",
diff --git a/y2023/control_loops/drivetrain/BUILD b/y2023/control_loops/drivetrain/BUILD
index 09e5137..416d6d9 100644
--- a/y2023/control_loops/drivetrain/BUILD
+++ b/y2023/control_loops/drivetrain/BUILD
@@ -122,3 +122,12 @@
gen_reflections = 1,
visibility = ["//visibility:public"],
)
+
+flatbuffer_cc_library(
+ name = "target_selector_hint_fbs",
+ srcs = [
+ ":target_selector_hint.fbs",
+ ],
+ gen_reflections = 1,
+ visibility = ["//visibility:public"],
+)
diff --git a/y2023/control_loops/drivetrain/target_selector_hint.fbs b/y2023/control_loops/drivetrain/target_selector_hint.fbs
new file mode 100644
index 0000000..0a16a59
--- /dev/null
+++ b/y2023/control_loops/drivetrain/target_selector_hint.fbs
@@ -0,0 +1,33 @@
+namespace y2023.control_loops.drivetrain;
+
+// Which of the grids we are going for.
+// From the perspective of the robot!
+enum GridSelectionHint : ubyte {
+ LEFT,
+ MIDDLE,
+ RIGHT,
+}
+
+// Which level to score on.
+enum RowSelectionHint : ubyte {
+ BOTTOM,
+ MIDDLE,
+ TOP,
+}
+
+// Within a row, which spot to score in.
+// From the perspective of the robot!
+enum SpotSelectionHint : ubyte {
+ LEFT,
+ MIDDLE,
+ RIGHT,
+}
+
+
+table TargetSelectorHint {
+ grid:GridSelectionHint (id: 0);
+ row:RowSelectionHint (id: 1);
+ spot:SpotSelectionHint (id: 2);
+}
+
+root_type TargetSelectorHint;
diff --git a/y2023/y2023_roborio.json b/y2023/y2023_roborio.json
index 70a6685..44b6aff 100644
--- a/y2023/y2023_roborio.json
+++ b/y2023/y2023_roborio.json
@@ -451,6 +451,11 @@
"frequency": 1,
"num_senders": 2,
"max_size": 4096
+ },
+ {
+ "name": "/drivetrain",
+ "type": "y2023.control_loops.drivetrain.TargetSelectorHint",
+ "source_node": "roborio"
}
],
"applications": [