From e345205bd0ef73d74f62f3b178c316ceb1f2280d Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 19 Jan 2025 01:09:05 +1100 Subject: [PATCH] Update wpimath.interpolation re-exports --- .../robotpy-wpimath/tests/test_interpolation.py | 1 + .../robotpy-wpimath/wpimath/interpolation/__init__.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/subprojects/robotpy-wpimath/tests/test_interpolation.py b/subprojects/robotpy-wpimath/tests/test_interpolation.py index e15c05ed7..8e8bd5547 100644 --- a/subprojects/robotpy-wpimath/tests/test_interpolation.py +++ b/subprojects/robotpy-wpimath/tests/test_interpolation.py @@ -44,6 +44,7 @@ def test_pose2d(): buffer.addSample(0, Pose2d(0, 0, Rotation2d.fromDegrees(90))) buffer.addSample(1, Pose2d(1, 1, Rotation2d(0))) sample = buffer.sample(0.5) + assert sample is not None assert math.isclose(sample.X(), 1 - 1 / 2**0.5) assert math.isclose(sample.Y(), 1 / 2**0.5) assert math.isclose(sample.rotation().degrees(), 45) diff --git a/subprojects/robotpy-wpimath/wpimath/interpolation/__init__.py b/subprojects/robotpy-wpimath/wpimath/interpolation/__init__.py index 206b49aeb..4e5fbde8f 100644 --- a/subprojects/robotpy-wpimath/wpimath/interpolation/__init__.py +++ b/subprojects/robotpy-wpimath/wpimath/interpolation/__init__.py @@ -1,14 +1,22 @@ from . import _init_interpolation # noqa: F401 -# autogenerated by 'robotpy-build create-imports wpimath.interpolation' +# autogenerated by 'robotpy-build create-imports wpimath.interpolation wpimath.interpolation._interpolation' from ._interpolation import ( TimeInterpolatableFloatBuffer, TimeInterpolatablePose2dBuffer, + TimeInterpolatablePose3dBuffer, TimeInterpolatableRotation2dBuffer, + TimeInterpolatableRotation3dBuffer, + TimeInterpolatableTranslation2dBuffer, + TimeInterpolatableTranslation3dBuffer, ) __all__ = [ "TimeInterpolatableFloatBuffer", "TimeInterpolatablePose2dBuffer", + "TimeInterpolatablePose3dBuffer", "TimeInterpolatableRotation2dBuffer", + "TimeInterpolatableRotation3dBuffer", + "TimeInterpolatableTranslation2dBuffer", + "TimeInterpolatableTranslation3dBuffer", ]