Added Zeroing::offset_ready() helper and TODO.
Change-Id: I1bd1d0e667bb9081896f6f48030b8fcfb95cdc79
diff --git a/frc971/zeroing/zeroing.h b/frc971/zeroing/zeroing.h
index 4176f48..433745a 100644
--- a/frc971/zeroing/zeroing.h
+++ b/frc971/zeroing/zeroing.h
@@ -63,6 +63,11 @@
return start_pos_samples_.size() / static_cast<double>(max_sample_count_);
}
+ // Returns true if the sample buffer is full.
+ bool offset_ready() const {
+ return start_pos_samples_.size() == max_sample_count_;
+ }
+
private:
// This function calculates the start position given the internal state and
// the provided `latched_encoder' value.