Hello,
I’m the programming lead for Team 599. I’m developing our swerve code this year and we’re using am having trouble finding the 2024 equivalent of the following commands:
- swerveCANCoderConfig.sensorTimeBase = SensorTimeBase.PerSecond;
- swerveDriveFXConfig.initializationStrategy = SensorInitializationStrategy.BootToZero;
- m_AngleMotor.set(ControlMode.Position, degreesToFalcon(angle));
- m_DriveMotor.set(ControlMode.Velocity, velocity, DemandType.ArbitraryFeedForward, voltageFeedForward);
Currently I have simpleMotorFeedforwards running as replacements for commands 3 and 4, but I’m not entirely sure if it’ll work. I was thinking of setting the motor position to 0 upon initializing to address command 2, but I’m not sure how to work around/replace command 1.
These commands will be used in the HardwareConfig.java and SwerveModule.java files in the DriveTrain branch.
I’ve linked our 2024 code below:
https://github.com/Robodox-599/2024_UnnamedBot
Any help is much appreciated!