Make zeroing constants structs flatbuffers

This defines all the zeroing structs as flatbuffers and then converts
everything to use the FlatbufferT types.

This is in service of moving zeroing constants into flatbuffers.

Change-Id: Ied7ac78cfcba0f66b4b684fd9e49a49276e55169
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/frc971/zeroing/absolute_encoder_test.cc b/frc971/zeroing/absolute_encoder_test.cc
index fdc1fa0..6e78faa 100644
--- a/frc971/zeroing/absolute_encoder_test.cc
+++ b/frc971/zeroing/absolute_encoder_test.cc
@@ -31,10 +31,14 @@
   const double start_pos = 2.1;
   double measured_absolute_position = 0.3 * index_diff;
 
-  AbsoluteEncoderZeroingConstants constants{
-      kSampleSize,        index_diff, measured_absolute_position,
-      kMiddlePosition,    0.1,        kMovingBufferSize,
-      kIndexErrorFraction};
+  AbsoluteEncoderZeroingConstants constants{{},
+                                            kSampleSize,
+                                            index_diff,
+                                            measured_absolute_position,
+                                            kMiddlePosition,
+                                            0.1,
+                                            kMovingBufferSize,
+                                            kIndexErrorFraction};
 
   sim.Initialize(start_pos, index_diff / 3.0, 0.0,
                  constants.measured_absolute_position);
@@ -61,10 +65,14 @@
   double measured_absolute_position = 0.3 * index_diff;
   const double kMiddlePosition = 2.5;
 
-  AbsoluteEncoderZeroingConstants constants{
-      kSampleSize,        index_diff, measured_absolute_position,
-      kMiddlePosition,    0.1,        kMovingBufferSize,
-      kIndexErrorFraction};
+  AbsoluteEncoderZeroingConstants constants{{},
+                                            kSampleSize,
+                                            index_diff,
+                                            measured_absolute_position,
+                                            kMiddlePosition,
+                                            0.1,
+                                            kMovingBufferSize,
+                                            kIndexErrorFraction};
 
   sim.Initialize(start_pos, index_diff / 3.0, 0.0,
                  constants.measured_absolute_position);
@@ -100,10 +108,14 @@
   double measured_absolute_position = 0.3 * index_diff;
   const double kMiddlePosition = 2.5;
 
-  AbsoluteEncoderZeroingConstants constants{
-      kSampleSize,        index_diff, measured_absolute_position,
-      kMiddlePosition,    0.1,        kMovingBufferSize,
-      kIndexErrorFraction};
+  AbsoluteEncoderZeroingConstants constants{{},
+                                            kSampleSize,
+                                            index_diff,
+                                            measured_absolute_position,
+                                            kMiddlePosition,
+                                            0.1,
+                                            kMovingBufferSize,
+                                            kIndexErrorFraction};
 
   sim.Initialize(start_pos, index_diff / 3.0, 0.0,
                  constants.measured_absolute_position);
@@ -122,8 +134,14 @@
 
 // Makes sure we detect an error if the ZeroingEstimator gets sent a NaN.
 TEST_F(AbsoluteEncoderZeroingTest, TestAbsoluteEncoderZeroingWithNaN) {
-  AbsoluteEncoderZeroingConstants constants{
-      kSampleSize, 1, 0.3, 1.0, 0.1, kMovingBufferSize, kIndexErrorFraction};
+  AbsoluteEncoderZeroingConstants constants{{},
+                                            kSampleSize,
+                                            1,
+                                            0.3,
+                                            1.0,
+                                            0.1,
+                                            kMovingBufferSize,
+                                            kIndexErrorFraction};
 
   AbsoluteEncoderZeroingEstimator estimator(constants);