Add flatbuffer schema for galatic search challenge path
The flatbuffer will be send on the /camera channel indicating the path on the field so that the correct spline can be run.
Change-Id: I661725f1e1ebd31b1316bc7a6ed12a6356a3a1dd
diff --git a/y2020/vision/BUILD b/y2020/vision/BUILD
index a5d47fa..187dedc 100644
--- a/y2020/vision/BUILD
+++ b/y2020/vision/BUILD
@@ -9,6 +9,14 @@
visibility = ["//y2020:__subpackages__"],
)
+flatbuffer_cc_library(
+ name = "galactic_search_path_fbs",
+ srcs = ["galactic_search_path.fbs"],
+ gen_reflections = 1,
+ target_compatible_with = ["@platforms//os:linux"],
+ visibility = ["//y2020:__subpackages__"],
+)
+
cc_library(
name = "v4l2_reader",
srcs = [
diff --git a/y2020/vision/galactic_search_path.fbs b/y2020/vision/galactic_search_path.fbs
new file mode 100644
index 0000000..d1e1223
--- /dev/null
+++ b/y2020/vision/galactic_search_path.fbs
@@ -0,0 +1,22 @@
+namespace y2020.vision;
+
+enum Alliance : byte {
+ kRed,
+ kBlue,
+ kUnknown
+}
+
+enum Letter : byte {
+ kA,
+ kB
+}
+
+table GalacticSearchPath {
+ // Alliance of the path
+ alliance:Alliance (id: 0);
+
+ // Letter of the path
+ letter:Letter (id: 1);
+}
+
+root_type GalacticSearchPath;