Migrating to 2025 code - Swerve

Hi my team uses NEO’s and Sparkmax’s for our drive system. after the shift to 2025, we have been having a lot of issues with our swerve module file and migrating it to work with 2025 Wpilib could anyone help?

Github

Link is not working, send again the link, please. As well, it´s syntax problems or problems to drive the chassi?

[lordofswarm/2654_2025](lordofswarm/2654_2025)

syntax problems

You’ll get much better answers if you’re specific in your questions or description of your problems.

That said, I’m assuming you’re referring to this file, and specifically with the configuration of your SparkMax objects.

If so, the answer is likely on this page, though I didn’t see the revlib vendordep in your project, so I’m not convinced this project is actually fully up to date.

it should be up to date now

Specifically these sections:
CANcoderConfiguration canCoderConfiguration = new CANcoderConfiguration();
canCoderConfiguration.MagnetSensor.AbsoluteSensorDiscontinuityPoint = AbsoluteSensorDiscontinuityPoint.Unsigned_0To1;
canCoderConfiguration.MagnetSensor.MagnetOffset = -(steerOffset.getRadians() / (2 * Math.PI));
canCoderConfiguration.MagnetSensor.SensorDirection = SensorDirectionValue.Clockwise_Positive;

driveMotor = new SparkMax(driveMotorChannel, MotorType.kBrushless);
SparkMaxConfig configdrive = new SparkMaxConfig();
checkError(“Failed to restore drive motor factory defaults”, driveMotor.restoreFactoryDefaults());

configdrive.idleMode(SparkMax.IdleMode.kBrake)

driveEncoder.PositionConversionFactor(drivePositionConversionFactor),
// Velocity of the encoder in meters per second
driveEncoder.VelocityConversionFactor(drivePositionConversionFactor / 60.0)

checkError(
“Failed to set drive motor periodic status frame rate”,
steerMotor.setPeriodicFramePeriod(PeriodicFrame.kStatus0, 100),
steerMotor.setPeriodicFramePeriod(PeriodicFrame.kStatus1, 20),
steerMotor.setPeriodicFramePeriod(PeriodicFrame.kStatus2, 20)
);