From 3fc89c84d6ef02c4aed1d9485d64b87ae5b1f6e3 Mon Sep 17 00:00:00 2001 From: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> Date: Sun, 20 Oct 2019 16:11:17 -0500 Subject: [PATCH] Make splinePointsFromSplines public (#1963) --- .../include/frc/trajectory/TrajectoryGenerator.h | 3 +-- .../first/wpilibj/trajectory/TrajectoryGenerator.java | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/trajectory/TrajectoryGenerator.h b/wpilibc/src/main/native/include/frc/trajectory/TrajectoryGenerator.h index 061b3738fd..3f2156d887 100644 --- a/wpilibc/src/main/native/include/frc/trajectory/TrajectoryGenerator.h +++ b/wpilibc/src/main/native/include/frc/trajectory/TrajectoryGenerator.h @@ -130,14 +130,13 @@ class TrajectoryGenerator { units::meters_per_second_t maxVelocity, units::meters_per_second_squared_t maxAcceleration, bool reversed); - private: /** * Generate spline points from a vector of splines by parameterizing the * splines. * * @param splines The splines to parameterize. * - * @return The spline points. + * @return The spline points for use in time parameterization of a trajectory. */ template static std::vector SplinePointsFromSplines( diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/trajectory/TrajectoryGenerator.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/trajectory/TrajectoryGenerator.java index 364fa5f660..9d40206bc6 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/trajectory/TrajectoryGenerator.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/trajectory/TrajectoryGenerator.java @@ -217,7 +217,15 @@ public final class TrajectoryGenerator { ); } - private static List splinePointsFromSplines( + /** + * Generate spline points from a vector of splines by parameterizing the + * splines. + * + * @param splines The splines to parameterize. + * + * @return The spline points for use in time parameterization of a trajectory. + */ + public static List splinePointsFromSplines( Spline[] splines) { // Create the vector of spline points. var splinePoints = new ArrayList();