Use ErrorList in estimators

Support it in both the abs + abs, and pot + abs and just abs.

Change-Id: I1c11d5d1fdc3d644f9d391bde7c06b6c6e8ec57d
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
diff --git a/frc971/control_loops/control_loops.fbs b/frc971/control_loops/control_loops.fbs
index 243e2cb..da2dc05 100644
--- a/frc971/control_loops/control_loops.fbs
+++ b/frc971/control_loops/control_loops.fbs
@@ -86,6 +86,13 @@
   encoder:double (id: 0);
 }
 
+// An enum to represent the different types of errors
+// a zeroing estimator could have.
+enum ZeroingError : short {
+  OFFSET_MOVED_TOO_FAR,
+  LOST_ABSOLUTE_ENCODER
+}
+
 // The internal state of a zeroing estimator.
 table EstimatorState {
   // If true, there has been a fatal error for the estimator.
@@ -114,6 +121,9 @@
   // The estimated absolute position of the encoder.  This is filtered, so it
   // can be easily used when zeroing.
   absolute_position:double (id: 4);
+
+  // If errored, this contains the causes for the error.
+  errors: [ZeroingError] (id: 5);
 }
 
 // The internal state of a zeroing estimator.
@@ -128,6 +138,9 @@
   // The estimated absolute position of the encoder.  This is filtered, so it
   // can be easily used when zeroing.
   absolute_position:double (id: 3);
+
+  // If errored, this contains the causes for the error.
+  errors: [ZeroingError] (id: 4);
 }
 
 // The internal state of a zeroing estimator.
@@ -145,8 +158,12 @@
 
   // Estimated absolute position of the single turn absolute encoder.
   single_turn_absolute_position:double (id: 4);
+
+  // If errored, this contains the causes for the error.
+  errors: [ZeroingError] (id: 5);
 }
 
+
 table RelativeEncoderEstimatorState {
   // If true, there has been a fatal error for the estimator.
   error:bool (id: 0);