Change ZeroingEstimator constructors to explicit
Change-Id: I6dc6df30d7351ac52f4a8a06dfea57bbf1a47fdf
diff --git a/frc971/zeroing/zeroing.h b/frc971/zeroing/zeroing.h
index 9d7cea1..cfac284 100644
--- a/frc971/zeroing/zeroing.h
+++ b/frc971/zeroing/zeroing.h
@@ -42,7 +42,7 @@
using ZeroingConstants = constants::PotAndIndexPulseZeroingConstants;
using State = EstimatorState;
- PotAndIndexPulseZeroingEstimator(
+ explicit PotAndIndexPulseZeroingEstimator(
const constants::PotAndIndexPulseZeroingConstants &constants);
// Update the internal logic with the next sensor values.
@@ -121,8 +121,7 @@
double first_start_pos_;
};
-// Estimates the position with an incremental encoder with an index pulse and a
-// potentiometer.
+// Estimates the position with an incremental encoder and a hall effect sensor.
class HallEffectAndPositionZeroingEstimator : public ZeroingEstimator {
public:
using Position = HallEffectAndPosition;
@@ -203,7 +202,7 @@
using ZeroingConstants = constants::PotAndAbsoluteEncoderZeroingConstants;
using State = AbsoluteEstimatorState;
- PotAndAbsEncoderZeroingEstimator(
+ explicit PotAndAbsEncoderZeroingEstimator(
const constants::PotAndAbsoluteEncoderZeroingConstants &constants);
// Resets the internal logic so it needs to be re-zeroed.
@@ -276,7 +275,7 @@
using ZeroingConstants = constants::EncoderPlusIndexZeroingConstants;
using State = IndexEstimatorState;
- PulseIndexZeroingEstimator(const ZeroingConstants &constants)
+ explicit PulseIndexZeroingEstimator(const ZeroingConstants &constants)
: constants_(constants) {
Reset();
}