Reduce size of IMU zeroing buffer
The 10000 sample buffer was causing some issues. Lower the size of the
buffer until I can determine how I really want to manage it.
Change-Id: I9e4a84a8448ed4aeb7e7cc39622970a9aeede674
diff --git a/frc971/zeroing/imu_zeroer.h b/frc971/zeroing/imu_zeroer.h
index 5f53e0d..2662934 100644
--- a/frc971/zeroing/imu_zeroer.h
+++ b/frc971/zeroing/imu_zeroer.h
@@ -10,10 +10,12 @@
// able to do so.
class ImuZeroer {
public:
- // Average 5 seconds of data (assuming 2kHz sampling rate).
+ // Average 0.5 seconds of data (assuming 2kHz sampling rate).
// TODO(james): Make the gyro zero in a constant amount of time, rather than a
// constant number of samples...
- static constexpr size_t kSamplesToAverage = 10000.0;
+ // TODO(james): Run average and GetRange calculations over every sample on
+ // every timestep, to provide consistent timing.
+ static constexpr size_t kSamplesToAverage = 1000.0;
ImuZeroer();
bool Zeroed() const;