make the queues for this year's robot match the hardware better
Change-Id: Icada3ff4a7fc24e1ba1fea2e60945db8ebb23948
diff --git a/frc971/control_loops/control_loops.q b/frc971/control_loops/control_loops.q
index ffadb94..03929a2 100644
--- a/frc971/control_loops/control_loops.q
+++ b/frc971/control_loops/control_loops.q
@@ -1,23 +1,28 @@
package frc971;
-// Records edges captured on a single hall effect sensor.
-struct HallEffectStruct {
- bool current;
- int32_t posedge_count;
- int32_t negedge_count;
+// Represents all of the data for a single potentiometer and indexed encoder
+// pair.
+// The units on all of the positions are the same.
+// All encoder values are relative to where the encoder was at some arbitrary
+// point in time. All potentiometer values are relative to some arbitrary 0
+// position which varies with each robot.
+struct PotAndIndexPosition {
+ // Current position read from the encoder.
+ double encoder;
+ // Current position read from the potentiometer.
+ double pot;
+
+ // Position from the encoder latched at the last index pulse.
+ double latched_encoder;
+ // Position from the potentiometer latched at the last index pulse.
+ double latched_pot;
+
+ // How many index pulses we've seen since startup. Starts at 0.
+ uint32_t index_pulses;
};
-// Records the positions for a mechanism with edge-capturing sensors on it.
-struct HallEffectPositions {
- double current;
- double posedge;
- double negedge;
-};
-
-// Records edges captured on a single hall effect sensor.
-struct PosedgeOnlyCountedHallEffectStruct {
- bool current;
- int32_t posedge_count;
- int32_t negedge_count;
- double posedge_value;
+// A left/right pair of PotAndIndexPositions.
+struct PotAndIndexPair {
+ PotAndIndexPosition left;
+ PotAndIndexPosition right;
};