Fix various things not compiling with the Kff change
Change-Id: If73d4f1d98b7487f829eb0ca8b7aa4557d1e7b4f
diff --git a/frc971/control_loops/state_feedback_loop.h b/frc971/control_loops/state_feedback_loop.h
index 293bcb6..8af82b3 100644
--- a/frc971/control_loops/state_feedback_loop.h
+++ b/frc971/control_loops/state_feedback_loop.h
@@ -221,6 +221,20 @@
const StateFeedbackPlantCoefficients<number_of_states, number_of_inputs,
number_of_outputs> &plant)
: L(L), K(K), Kff(Kff), A_inv(A_inv), plant(plant) {}
+
+ // TODO(Brian): Remove this overload once they're all converted.
+ StateFeedbackController(
+ const Eigen::Matrix<double, number_of_states, number_of_outputs> &L,
+ const Eigen::Matrix<double, number_of_inputs, number_of_states> &K,
+ const Eigen::Matrix<double, number_of_states, number_of_states> &A_inv,
+ const StateFeedbackPlantCoefficients<number_of_states, number_of_inputs,
+ number_of_outputs> &plant)
+ : L(L),
+ K(K),
+ Kff(::Eigen::Matrix<double, number_of_inputs,
+ number_of_states>::Zero()),
+ A_inv(A_inv),
+ plant(plant) {}
};
template <int number_of_states, int number_of_inputs, int number_of_outputs>
@@ -237,20 +251,6 @@
Reset();
}
- StateFeedbackLoop(
- const Eigen::Matrix<double, number_of_states, number_of_outputs> &L,
- const Eigen::Matrix<double, number_of_inputs, number_of_states> &K,
- const Eigen::Matrix<double, number_of_states, number_of_states> &A_inv,
- const StateFeedbackPlantCoefficients<number_of_states, number_of_inputs,
- number_of_outputs> &plant)
- : controller_index_(0) {
- controllers_.emplace_back(
- new StateFeedbackController<number_of_states, number_of_inputs,
- number_of_outputs>(L, K, A_inv, plant));
-
- Reset();
- }
-
StateFeedbackLoop(::std::vector<::std::unique_ptr<StateFeedbackController<
number_of_states, number_of_inputs, number_of_outputs>>> *controllers)
: controllers_(::std::move(*controllers)), controller_index_(0) {