mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Fix deprecation warnings in PhotonLib examples (#1699)
The following deprecation warnings have been fixed: - `SwerveModuleState.optimize(desiredState, currentRotation);`, which is now an instance method - `AprilTagFields.kDefaultField.loadAprilTagLayoutField();`, which is now `AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);` WIP: - [x] C++ - [x] Python
This commit is contained in:
@@ -108,7 +108,7 @@ public class SwerveModule {
|
||||
SwerveModuleState desiredState, boolean openLoop, boolean steerInPlace) {
|
||||
Rotation2d currentRotation = getAbsoluteHeading();
|
||||
// Avoid turning more than 90 degrees by inverting speed on large angle changes
|
||||
desiredState = SwerveModuleState.optimize(desiredState, currentRotation);
|
||||
desiredState.optimize(currentRotation);
|
||||
|
||||
this.desiredState = desiredState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user