From 5623a2ac28a53b70b81e0ca950e4f31d14c346ab Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 13 Jul 2024 06:49:50 -0700 Subject: [PATCH] Fix Spline.getPoint() call (#307) --- .../edu/wpi/first/pathweaver/spline/wpilib/WpilibSpline.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/wpi/first/pathweaver/spline/wpilib/WpilibSpline.java b/src/main/java/edu/wpi/first/pathweaver/spline/wpilib/WpilibSpline.java index c5b76220..fd9af938 100644 --- a/src/main/java/edu/wpi/first/pathweaver/spline/wpilib/WpilibSpline.java +++ b/src/main/java/edu/wpi/first/pathweaver/spline/wpilib/WpilibSpline.java @@ -76,7 +76,7 @@ public void update() { SplineSegment seg = new SplineSegment(waypoints.get(i-1), waypoints.get(i), path); for (int sample = 0; sample <= 40; sample++) { - PoseWithCurvature pose = quintic.getPoint(sample / 40.0); + PoseWithCurvature pose = quintic.getPoint(sample / 40.0).get(); seg.getLine().getPoints().add(pose.poseMeters.getTranslation().getX()); //Convert from WPILib to JavaFX coords seg.getLine().getPoints().add(-pose.poseMeters.getTranslation().getY());