No zeroing while moving for absolute encoders
Modified zeroing code for pot and absolute encoder to no longer
update estimates of offsets while moving. This causes a delay of
3 samples (due to a sample buffer size).
Change-Id: Iaf82ad83ebcfc68fa75ce23716c7d89a6e34a917
diff --git a/frc971/constants.h b/frc971/constants.h
index 276dcc2..d91e197 100644
--- a/frc971/constants.h
+++ b/frc971/constants.h
@@ -34,6 +34,9 @@
// Treshold for deciding if we are moving
// TODO(austin): Figure out what this is actually measuring.
double zeroing_threshold;
+
+ // Buffer size for deciding if we are moving.
+ size_t moving_buffer_size;
};
// Defines a range of motion for a subsystem.