I have been trying to implement Swerve onto the 2024 version code. I saw that there were a lot of methods from TalonFX were gone. I have several questions, I will list them below:
Since the WPI_TalonFX is removed, now they are using the phoenix6 TalonFX lib, I was trying to find the configFactoryDefault command and was not able to find it. What is it?
Also there are commands gone in CANcoder lib too, I can’t find the configAbsoluteSensorRange and configFactoryDefault. What is it?
Who do I cast or convert the StatuesSignal values to a double?
What is the command to getSelectedSensorPosition and getSelectedSensorVelocity and setSelectedSensorPosition in phoenix6 lib?
To config factory default use: m_motor.getConfigurator().apply(new TalonFXConfiguration());
For absolute sensor range create a cancoder configurator object and set this equal to any of the options in the AbsoluteSensorRangeValue enum: cancoder_config.MagnetSensor.AbsoluteSensorRange
and setting factory default is the same as it is for the motor.
.getValueAsDouble() converts a status signal to a double