Added estimator state to status.
Change-Id: I541c772bfd159e5db5a8237aa948358e7d296e5b
diff --git a/frc971/control_loops/fridge/fridge.q b/frc971/control_loops/fridge/fridge.q
index e8105d6..cf69efc 100644
--- a/frc971/control_loops/fridge/fridge.q
+++ b/frc971/control_loops/fridge/fridge.q
@@ -12,6 +12,16 @@
bool bottom_back;
};
+// The internal state of the zeroing estimator.
+struct EstimatorState {
+ // If true, there has been a fatal error for the estimator.
+ bool error;
+ // If the joint has seen an index pulse and is zeroed.
+ bool zeroed;
+ // The estimated position of the joint.
+ double position;
+};
+
queue_group FridgeQueue {
implements aos.control_loops.ControlLoop;
@@ -60,6 +70,11 @@
// The internal state of the state machine.
int32_t state;
+
+ EstimatorState left_elevator_state;
+ EstimatorState right_elevator_state;
+ EstimatorState left_arm_state;
+ EstimatorState right_arm_state;
};
message Output {