Renamed ZeroingEstimator to PotAndIndexPulseZeroingEstimator
Renamed to allow for creating a new interface named ZeroingEstimator
in the future.
Change-Id: I374808cdc39dd4141ea67c81de69bbac98326648
diff --git a/y2015/constants.h b/y2015/constants.h
index 8cefe7e..d60efac 100644
--- a/y2015/constants.h
+++ b/y2015/constants.h
@@ -69,7 +69,7 @@
struct Claw {
Range wrist;
- ::frc971::constants::ZeroingConstants zeroing;
+ ::frc971::constants::PotAndIndexPulseZeroingConstants zeroing;
// The value to add to potentiometer readings after they have been converted
// to radians so that the resulting value is 0 when the claw is at absolute
// 0 (horizontal straight out the front).
@@ -87,10 +87,10 @@
Range elevator;
Range arm;
- ::frc971::constants::ZeroingConstants left_elev_zeroing;
- ::frc971::constants::ZeroingConstants right_elev_zeroing;
- ::frc971::constants::ZeroingConstants left_arm_zeroing;
- ::frc971::constants::ZeroingConstants right_arm_zeroing;
+ ::frc971::constants::PotAndIndexPulseZeroingConstants left_elev_zeroing;
+ ::frc971::constants::PotAndIndexPulseZeroingConstants right_elev_zeroing;
+ ::frc971::constants::PotAndIndexPulseZeroingConstants left_arm_zeroing;
+ ::frc971::constants::PotAndIndexPulseZeroingConstants right_arm_zeroing;
// Values to add to scaled potentiometer readings so 0 lines up with the
// physical absolute 0.
diff --git a/y2015/control_loops/claw/claw.h b/y2015/control_loops/claw/claw.h
index 324f9f3..e7523eb 100644
--- a/y2015/control_loops/claw/claw.h
+++ b/y2015/control_loops/claw/claw.h
@@ -95,7 +95,7 @@
// Latest position from queue.
control_loops::ClawQueue::Position current_position_;
// Zeroing estimator for claw.
- ::frc971::zeroing::ZeroingEstimator claw_estimator_;
+ ::frc971::zeroing::PotAndIndexPulseZeroingEstimator claw_estimator_;
// The goal for the claw.
double claw_goal_ = 0.0;
diff --git a/y2015/control_loops/fridge/fridge.h b/y2015/control_loops/fridge/fridge.h
index ee64554..6152caf 100644
--- a/y2015/control_loops/fridge/fridge.h
+++ b/y2015/control_loops/fridge/fridge.h
@@ -22,7 +22,7 @@
class FridgeTest_SafeArmZeroing_Test;
} // namespace testing
-template<int S>
+template <int S>
class CappedStateFeedbackLoop : public StateFeedbackLoop<S, 2, 2> {
public:
CappedStateFeedbackLoop(StateFeedbackLoop<S, 2, 2> &&loop)
@@ -42,8 +42,7 @@
double max_voltage_;
};
-class Fridge
- : public aos::controls::ControlLoop<FridgeQueue> {
+class Fridge : public aos::controls::ControlLoop<FridgeQueue> {
public:
explicit Fridge(FridgeQueue *fridge_queue =
&::y2015::control_loops::fridge::fridge_queue);
@@ -128,10 +127,10 @@
::std::unique_ptr<CappedStateFeedbackLoop<5>> arm_loop_;
::std::unique_ptr<CappedStateFeedbackLoop<4>> elevator_loop_;
- ::frc971::zeroing::ZeroingEstimator left_arm_estimator_;
- ::frc971::zeroing::ZeroingEstimator right_arm_estimator_;
- ::frc971::zeroing::ZeroingEstimator left_elevator_estimator_;
- ::frc971::zeroing::ZeroingEstimator right_elevator_estimator_;
+ ::frc971::zeroing::PotAndIndexPulseZeroingEstimator left_arm_estimator_;
+ ::frc971::zeroing::PotAndIndexPulseZeroingEstimator right_arm_estimator_;
+ ::frc971::zeroing::PotAndIndexPulseZeroingEstimator left_elevator_estimator_;
+ ::frc971::zeroing::PotAndIndexPulseZeroingEstimator right_elevator_estimator_;
// Offsets from the encoder position to the absolute position. Add these to
// the encoder position to get the absolute position.
@@ -170,5 +169,4 @@
} // namespace control_loops
} // namespace y2015
-#endif // Y2015_CONTROL_LOOPS_FRIDGE_H_
-
+#endif // Y2015_CONTROL_LOOPS_FRIDGE_H_