Convert y2014 to use explicit ids
This makes it harder to accidentally break compatability
Change-Id: Id0e5cdb56a1e442b7d39fd7c9f9424a192462462
diff --git a/y2014/control_loops/shooter/shooter_goal.fbs b/y2014/control_loops/shooter/shooter_goal.fbs
index 3326562..5f009e7 100644
--- a/y2014/control_loops/shooter/shooter_goal.fbs
+++ b/y2014/control_loops/shooter/shooter_goal.fbs
@@ -2,11 +2,11 @@
table Goal {
// Shot power in joules.
- shot_power:double;
+ shot_power:double (id: 0);
// Shoots as soon as this is true.
- shot_requested:bool;
- unload_requested:bool;
- load_requested:bool;
+ shot_requested:bool (id: 1);
+ unload_requested:bool (id: 2);
+ load_requested:bool (id: 3);
}
root_type Goal;
diff --git a/y2014/control_loops/shooter/shooter_output.fbs b/y2014/control_loops/shooter/shooter_output.fbs
index e1900c4..eaf0713 100644
--- a/y2014/control_loops/shooter/shooter_output.fbs
+++ b/y2014/control_loops/shooter/shooter_output.fbs
@@ -1,11 +1,11 @@
namespace y2014.control_loops.shooter;
table Output {
- voltage:double;
+ voltage:double (id: 0);
// true: latch engaged, false: latch open
- latch_piston:bool;
+ latch_piston:bool (id: 1);
// true: brake engaged false: brake released
- brake_piston:bool;
+ brake_piston:bool (id: 2);
}
root_type Output;
diff --git a/y2014/control_loops/shooter/shooter_position.fbs b/y2014/control_loops/shooter/shooter_position.fbs
index 9c73a1a..50a6129 100644
--- a/y2014/control_loops/shooter/shooter_position.fbs
+++ b/y2014/control_loops/shooter/shooter_position.fbs
@@ -5,17 +5,17 @@
// Back is when the springs are all the way stretched.
table Position {
// In meters, out is positive.
- position:double;
+ position:double (id: 0);
// If the latch piston is fired and this hall effect has been triggered, the
// plunger is all the way back and latched.
- plunger:bool;
+ plunger:bool (id: 1);
// Gets triggered when the pusher is all the way back.
- pusher_distal:frc971.PosedgeOnlyCountedHallEffectStruct;
+ pusher_distal:frc971.PosedgeOnlyCountedHallEffectStruct (id: 2);
// Triggers just before pusher_distal.
- pusher_proximal:frc971.PosedgeOnlyCountedHallEffectStruct;
+ pusher_proximal:frc971.PosedgeOnlyCountedHallEffectStruct (id: 3);
// Triggers when the latch engages.
- latch:bool;
+ latch:bool (id: 4);
}
root_type Position;
diff --git a/y2014/control_loops/shooter/shooter_status.fbs b/y2014/control_loops/shooter/shooter_status.fbs
index 4e76e27..ba1969d 100644
--- a/y2014/control_loops/shooter/shooter_status.fbs
+++ b/y2014/control_loops/shooter/shooter_status.fbs
@@ -2,20 +2,20 @@
table Status {
// Whether it's ready to shoot right now.
- ready:bool;
+ ready:bool (id: 0);
// Whether the plunger is in and out of the way of grabbing a ball.
// TODO(ben): Populate these!
//cocked:bool;
// How many times we've shot.
- shots:int;
+ shots:int32 (id: 1);
//done:bool;
// What we think the current position of the hard stop on the shooter is, in
// shot power (Joules).
- hard_stop_power:double;
+ hard_stop_power:double (id: 2);
- absolute_position:double;
- absolute_velocity:double;
- state:uint;
+ absolute_position:double (id: 3);
+ absolute_velocity:double (id: 4);
+ state:uint32 (id: 5);
}
root_type Status;