Added overrides for canandcoder, falcon/talonfx for encoder pulse per rotation configuration option.

This commit is contained in:
thenetworkgrinch
2023-08-09 16:20:15 -05:00
parent f88fdfb6cf
commit de4e35db62
3 changed files with 30 additions and 3 deletions

View File

@@ -3,7 +3,6 @@ package swervelib.parser;
import static swervelib.math.SwerveMath.calculateDegreesPerSteeringRotation;
import static swervelib.math.SwerveMath.calculateMaxAcceleration;
import static swervelib.math.SwerveMath.calculateMetersPerRotation;
import edu.wpi.first.math.controller.SimpleMotorFeedforward;
import edu.wpi.first.math.geometry.Translation2d;
import swervelib.encoders.SwerveAbsoluteEncoder;
@@ -200,7 +199,7 @@ public class SwerveModuleConfiguration
? calculateMetersPerRotation(
physicalCharacteristics.wheelDiameter,
physicalCharacteristics.driveGearRatio,
angleMotorEncoderPulsePerRevolution)
physicalCharacteristics.driveEncoderPulsePerRotation)
: calculateDegreesPerSteeringRotation(
physicalCharacteristics.angleGearRatio,
angleMotorEncoderPulsePerRevolution);