Use explicit flatbuffer IDs in y2017 and newer.
Non-explicit ids are risky. We've seen backwards incompatible
changes...
Change-Id: Id6ceebe031ac80430191f367635d0e951c3d2cbc
diff --git a/y2019/control_loops/drivetrain/camera.fbs b/y2019/control_loops/drivetrain/camera.fbs
index 154dd2e..74117d9 100644
--- a/y2019/control_loops/drivetrain/camera.fbs
+++ b/y2019/control_loops/drivetrain/camera.fbs
@@ -2,23 +2,23 @@
// See the Target structure in //y2019/jevois:structures.h for documentation.
table CameraTarget {
- distance:float;
- height:float;
- heading:float;
- skew:float;
+ distance:float (id: 0);
+ height:float (id: 1);
+ heading:float (id: 2);
+ skew:float (id: 3);
}
// Frames from a camera.
table CameraFrame {
// Number of nanoseconds since the aos::monotonic_clock epoch at which this
// frame was captured.
- timestamp:long;
+ timestamp:long (id: 0);
// Buffer for the 3 targets.
- targets:[CameraTarget];
+ targets:[CameraTarget] (id: 1);
// Index of the camera position (not serial number) which this frame is from.
- camera:ubyte;
+ camera:ubyte (id: 2);
}
root_type CameraFrame;
diff --git a/y2019/control_loops/drivetrain/target_selector.fbs b/y2019/control_loops/drivetrain/target_selector.fbs
index f7a3291..b997bdb 100644
--- a/y2019/control_loops/drivetrain/target_selector.fbs
+++ b/y2019/control_loops/drivetrain/target_selector.fbs
@@ -17,7 +17,7 @@
// The drivetrain listens on ".y2019.control_loops.drivetrain.target_selector_hint"
table TargetSelectorHint {
// Which target we should go for:
- suggested_target:SelectionHint;
+ suggested_target:SelectionHint (id: 0);
}
root_type TargetSelectorHint;