From 3288b3cec3192901ac381dc824189f1150267567 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 25 Nov 2024 09:29:03 -0800 Subject: [PATCH] Expand deprecation message --- .../main/java/edu/wpi/first/math/StateSpaceUtil.java | 9 ++++++--- wpimath/src/main/native/include/frc/StateSpaceUtil.h | 12 +++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/StateSpaceUtil.java b/wpimath/src/main/java/edu/wpi/first/math/StateSpaceUtil.java index 91f2bf8a508..eb494308926 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/StateSpaceUtil.java +++ b/wpimath/src/main/java/edu/wpi/first/math/StateSpaceUtil.java @@ -131,7 +131,8 @@ public static boolean isDetectable( * * @param pose A pose to convert to a vector. * @return The given pose in vector form, with the third element, theta, in radians. - * @deprecated Use {@link Pose2d#toMatrix()} instead. + * @deprecated Create the vector manually instead. If you were using this as an intermediate step + * for constructing affine transformations, use {@link Pose2d#toMatrix()} instead. */ @Deprecated(forRemoval = true, since = "2025") public static Matrix poseToVector(Pose2d pose) { @@ -182,7 +183,8 @@ public static Matrix desaturateInputVector( * * @param pose A pose to convert to a vector. * @return The given pose in as a 4x1 vector of x, y, cos(theta), and sin(theta). - * @deprecated Use {@link Pose2d#toMatrix()} instead. + * @deprecated Create the vector manually instead. If you were using this as an intermediate step + * for constructing affine transformations, use {@link Pose2d#toMatrix()} instead. */ @Deprecated(forRemoval = true, since = "2025") public static Matrix poseTo4dVector(Pose2d pose) { @@ -198,7 +200,8 @@ public static Matrix poseTo4dVector(Pose2d pose) { * * @param pose A pose to convert to a vector. * @return The given pose in vector form, with the third element, theta, in radians. - * @deprecated Use {@link Pose2d#toMatrix()} instead. + * @deprecated Create the vector manually instead. If you were using this as an intermediate step + * for constructing affine transformations, use {@link Pose2d#toMatrix()} instead. */ @Deprecated(forRemoval = true, since = "2025") public static Matrix poseTo3dVector(Pose2d pose) { diff --git a/wpimath/src/main/native/include/frc/StateSpaceUtil.h b/wpimath/src/main/native/include/frc/StateSpaceUtil.h index f5435545232..1e8ae2a1081 100644 --- a/wpimath/src/main/native/include/frc/StateSpaceUtil.h +++ b/wpimath/src/main/native/include/frc/StateSpaceUtil.h @@ -206,7 +206,9 @@ Vectord MakeWhiteNoiseVector(const std::array& stdDevs) { * @param pose The pose that is being represented. * * @return The vector. - * @deprecated Use Pose2d.ToMatrix() instead. + * @deprecated Create the vector manually instead. If you were using this as an + * intermediate step for constructing affine transformations, use + * Pose2d.ToMatrix() instead. */ [[deprecated("Use Pose2d.ToMatrix() instead.")]] WPILIB_DLLEXPORT constexpr Eigen::Vector3d PoseTo3dVector(const Pose2d& pose) { @@ -221,7 +223,9 @@ WPILIB_DLLEXPORT constexpr Eigen::Vector3d PoseTo3dVector(const Pose2d& pose) { * @param pose The pose that is being represented. * * @return The vector. - * @deprecated Use Pose2d.ToMatrix() instead. + * @deprecated Create the vector manually instead. If you were using this as an + * intermediate step for constructing affine transformations, use + * Pose2d.ToMatrix() instead. */ [[deprecated("Use Pose2d.ToMatrix() instead.")]] WPILIB_DLLEXPORT constexpr Eigen::Vector4d PoseTo4dVector(const Pose2d& pose) { @@ -313,7 +317,9 @@ bool IsDetectable(const Matrixd& A, * @param pose The pose that is being represented. * * @return The vector. - * @deprecated Use Pose2d.ToMatrix() instead. + * @deprecated Create the vector manually instead. If you were using this as an + * intermediate step for constructing affine transformations, use + * Pose2d.ToMatrix() instead. */ [[deprecated("Use Pose2d.ToMatrix() instead.")]] WPILIB_DLLEXPORT constexpr Eigen::Vector3d PoseToVector(const Pose2d& pose) {