mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[wpimath] Clean up Eigen usage
* Replace Matrix<> with Vector<> where vectors are explicitly intended. I found these via `rg "Eigen::Matrix<double, \w+, 1>"`. * Pass all Eigen matrices by const reference. I found these via `rg "\(Eigen"` on main (the initializer list constructors make more false positives). * Replace MakeMatrix() and operator<< usage with initializer list constructors. I found these via `rg MakeMatrix` and `rg "<<"` respectively. * Deprecate MakeMatrix()
This commit is contained in:
committed by
Peter Johnson
parent
72716f51ce
commit
9359431bad
@@ -123,9 +123,9 @@ class ElevatorSim : public LinearSystemSim<2, 1, 1> {
|
||||
* @param u The system inputs (voltage).
|
||||
* @param dt The time difference between controller updates.
|
||||
*/
|
||||
Eigen::Matrix<double, 2, 1> UpdateX(
|
||||
const Eigen::Matrix<double, 2, 1>& currentXhat,
|
||||
const Eigen::Matrix<double, 1, 1>& u, units::second_t dt) override;
|
||||
Eigen::Vector<double, 2> UpdateX(const Eigen::Vector<double, 2>& currentXhat,
|
||||
const Eigen::Vector<double, 1>& u,
|
||||
units::second_t dt) override;
|
||||
|
||||
private:
|
||||
DCMotor m_gearbox;
|
||||
|
||||
Reference in New Issue
Block a user