Trouble with .configGetMagnetOffset method in phoenix 6

The error: The method configGetMagnetOffset(double) is undefined for the type CANcoderJava(67108964)

We’ve noticed that it’s not declared, but the code worked fine last year on phoenix 5. Have there been any changes to phoenix 6? Or are we missing something?

Thanks in advance
:grinning: :cowboy_hat_face:

For phoenix 6 sensors/motors, you should use a config object to configure settings instead of using set methods like v5.
This should go something like this:

CANcoderConfiguration config = new CANcoderConfiguration();
config.MagnetSensor.MagnetOffset = offset;
// more configurations
encoder.getConfigurator().apply(config);

I recommend reading the phoenix 6 docs (and more specifically the migration guide) for more information on how to use phoenix 6. A lot has changed from v5 to v6.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.