Update 2024.4.8.6

This commit is contained in:
thenetworkgrinch
2024-02-28 13:25:59 -06:00
parent 8d79dcb8b0
commit 9a2eb4e74f
111 changed files with 503 additions and 291 deletions

View File

@@ -839,9 +839,9 @@ public class SwerveDrive
module.maxSpeed = maximumSpeed;
if (updateModuleFeedforward)
{
module.feedforward = SwerveMath.createDriveFeedforward(optimalVoltage,
maximumSpeed,
swerveDriveConfiguration.physicalCharacteristics.wheelGripCoefficientOfFriction);
module.setFeedforward(SwerveMath.createDriveFeedforward(optimalVoltage,
maximumSpeed,
swerveDriveConfiguration.physicalCharacteristics.wheelGripCoefficientOfFriction));
}
}
}
@@ -851,7 +851,7 @@ public class SwerveDrive
* {@link SwerveDrive#setRawModuleStates(SwerveModuleState[], boolean)} function and
* {@link SwerveController#getTargetSpeeds(double, double, double, double, double)} functions. This function overrides
* what was placed in the JSON and could damage your motor/robot if set too high or unachievable rates. Overwrites the
* {@link SwerveModule#feedforward}.
* {@link SwerveModule#setFeedforward(SimpleMotorFeedforward)}.
*
* @param maximumSpeed Maximum speed for the drive motors in meters / second.
*/
@@ -908,13 +908,13 @@ public class SwerveDrive
/**
* Setup the swerve module feedforward.
*
* @param feedforward Feedforward for the drive motor on swerve modules.
* @param driveFeedforward Feedforward for the drive motor on swerve modules.
*/
public void replaceSwerveModuleFeedforward(SimpleMotorFeedforward feedforward)
public void replaceSwerveModuleFeedforward(SimpleMotorFeedforward driveFeedforward)
{
for (SwerveModule swerveModule : swerveModules)
{
swerveModule.feedforward = feedforward;
swerveModule.setFeedforward(driveFeedforward);
}
}
@@ -1114,7 +1114,7 @@ public class SwerveDrive
{
for (SwerveModule module : swerveModules)
{
module.configuration.driveMotor.setPosition(0);
module.getDriveMotor().setPosition(0);
}
}