[wpimath] Add typedefs for common types

This makes complex code significantly easier to read.

frc::Vectord<Size> = Eigen::Vector<double, Size>
frc::Matrixd<Rows, Cols> = Eigen::Matrix<double, Rows, Cols>
This commit is contained in:
Peter Johnson
2022-04-29 22:29:20 -07:00
parent 97c493241f
commit e767605e94
76 changed files with 1136 additions and 1449 deletions

View File

@@ -88,7 +88,7 @@ class Robot : public frc::TimedRobot {
void SimulationPeriodic() override {
// In this method, we update our simulation of what our elevator is doing
// First, we set our "inputs" (voltages)
m_elevatorSim.SetInput(Eigen::Vector<double, 1>{
m_elevatorSim.SetInput(frc::Vectord<1>{
m_motor.Get() * frc::RobotController::GetInputVoltage()});
// Next, we update it. The standard loop time is 20ms.