Upgrading to 2025.7.0

This commit is contained in:
thenetworkgrinch
2025-02-22 06:15:56 +00:00
parent 62f8236678
commit 4016ee2190
41 changed files with 2237 additions and 557 deletions

View File

@@ -75,6 +75,14 @@ public class ModuleJson
SwerveMotor angleMotor = angle.createMotor(false);
SwerveAbsoluteEncoder absEncoder = encoder.createEncoder(angleMotor);
//Throw an error if module locations are improperly set
if (location.front == 0 && location.left == 0)
{
throw new RuntimeException("Improper Module Location Settings!\n" +
"Your module location is set to 0 for both 'front' and 'left' values.\n" +
"Set the distance from the center of the robot to the center of the wheel in your module JSON file!");
}
// Set the conversion factors to null if they are both 0.
if (!conversionFactors.works() && physicalCharacteristics.conversionFactor == null)
{
@@ -119,8 +127,8 @@ public class ModuleJson
conversionFactors,
absEncoder,
absoluteEncoderOffset,
Units.inchesToMeters(Math.round(location.x) == 0 ? location.front : location.x),
Units.inchesToMeters(Math.round(location.y) == 0 ? location.left : location.y),
Units.inchesToMeters(Math.round(location.front)),
Units.inchesToMeters(Math.round(location.left)),
anglePIDF,
velocityPIDF,
physicalCharacteristics,