mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
wpilibj: Fix SwerveDriveKinematics ctor parameter name (#1889)
This commit is contained in:
committed by
Peter Johnson
parent
471f375a38
commit
2dfbb855d7
@@ -53,15 +53,15 @@ public class SwerveDriveKinematics {
|
||||
* pass in the module states in the same order when calling the forward
|
||||
* kinematics methods.
|
||||
*
|
||||
* @param wheelsMetersPerSecond The locations of the wheels relative to the physical center
|
||||
* of the robot.
|
||||
* @param wheelsMeters The locations of the wheels relative to the physical center
|
||||
* of the robot.
|
||||
*/
|
||||
public SwerveDriveKinematics(Translation2d... wheelsMetersPerSecond) {
|
||||
if (wheelsMetersPerSecond.length < 2) {
|
||||
public SwerveDriveKinematics(Translation2d... wheelsMeters) {
|
||||
if (wheelsMeters.length < 2) {
|
||||
throw new IllegalArgumentException("A swerve drive requires at least two modules");
|
||||
}
|
||||
m_numModules = wheelsMetersPerSecond.length;
|
||||
m_modules = Arrays.copyOf(wheelsMetersPerSecond, m_numModules);
|
||||
m_numModules = wheelsMeters.length;
|
||||
m_modules = Arrays.copyOf(wheelsMeters, m_numModules);
|
||||
m_inverseKinematics = new SimpleMatrix(m_numModules * 2, 3);
|
||||
|
||||
for (int i = 0; i < m_numModules; i++) {
|
||||
|
||||
Reference in New Issue
Block a user