Finished logic and fixed errors for index pulse zeroing
Changed some small logical errors and fixed compiler errors to finish
the index pulse zeroing system (for use without a potentiometer.
Error checking still needs to be added in the future.
Change-Id: I5f7b06d5d6de9eebcc918256632f017ef2b0736b
diff --git a/frc971/constants.h b/frc971/constants.h
index d91e197..57637dd 100644
--- a/frc971/constants.h
+++ b/frc971/constants.h
@@ -19,8 +19,15 @@
};
struct EncoderPlusIndexZeroingConstants {
- // The amount of index pulses in the limb's range of motion.
- int num_index_pulses;
+ // The amount of index pulses in the joint's range of motion.
+ int index_pulse_count;
+ // The difference in scaled units between two index pulses.
+ double index_difference;
+ // The absolute position in scaled units of one of the index pulses.
+ double measured_index_position;
+ // The index pulse that is known, going from lowest in the range of motion to
+ // highest (Starting at 0).
+ int known_index_pulse;
};
struct PotAndAbsoluteEncoderZeroingConstants {