From fc5973d6f89eb5093b433ee5d34b500e61712ab5 Mon Sep 17 00:00:00 2001 From: thenetworkgrinch Date: Sun, 25 Aug 2024 14:46:50 -0500 Subject: [PATCH] Adjusted placement of vision function. Signed-off-by: thenetworkgrinch --- .../swervedrive/SwerveSubsystem.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java index c0679eb4..d2bc3a72 100644 --- a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java @@ -123,6 +123,17 @@ public void updatePoseWithVision() vision.updatePoseEstimation(swerveDrive); } + /** + * Get the pose while updating with vision readings. + * + * @return The robots pose with the vision estimates in place. + */ + public Pose2d getVisionPose() + { + vision.updatePoseEstimation(swerveDrive); + return swerveDrive.getPose(); + } + /** * Setup AutoBuilder for PathPlanner. */ @@ -439,17 +450,6 @@ public Pose2d getPose() return swerveDrive.getPose(); } - /** - * Get the pose while updating with vision readings. - * - * @return The robots pose with the vision estimates in place. - */ - public Pose2d getVisionPose() - { - vision.updatePoseEstimation(swerveDrive); - return swerveDrive.getPose(); - } - /** * Set chassis speeds with closed-loop velocity control. *