From 836dfe65fda112fee6c29658cffa0006952c78f0 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 1 Jan 2025 00:18:22 -0800 Subject: [PATCH 1/4] Auto-gen stuff. and things. Things are cool too --- .gitignore | 3 ++- subprojects/robotpy-wpiutil/gen/RawFrame.yml | 6 ++++++ subprojects/robotpy-wpiutil/pyproject.toml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 subprojects/robotpy-wpiutil/gen/RawFrame.yml diff --git a/.gitignore b/.gitignore index 4ad02c91d..bc79fdc6a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ /dist rpy-include -py.typed \ No newline at end of file +py.typed +.venv/ diff --git a/subprojects/robotpy-wpiutil/gen/RawFrame.yml b/subprojects/robotpy-wpiutil/gen/RawFrame.yml new file mode 100644 index 000000000..571da3309 --- /dev/null +++ b/subprojects/robotpy-wpiutil/gen/RawFrame.yml @@ -0,0 +1,6 @@ +--- + +enums: + WPI_PixelFormat: + WPI_TimestampSource: + diff --git a/subprojects/robotpy-wpiutil/pyproject.toml b/subprojects/robotpy-wpiutil/pyproject.toml index 7bc431eaa..6748e110f 100644 --- a/subprojects/robotpy-wpiutil/pyproject.toml +++ b/subprojects/robotpy-wpiutil/pyproject.toml @@ -63,6 +63,7 @@ DataLogBackgroundWriter = "wpi/DataLogBackgroundWriter.h" DataLogWriter = "wpi/DataLogWriter.h" StackTrace = "wpi/StackTrace.h" Synchronization = "wpi/Synchronization.h" +RawFrame = "wpi/RawFrame.h" # wpi/sendable Sendable = "wpi/sendable/Sendable.h" From 761d91d92d2f2db13a11661f703179a4d41cc9cd Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 1 Jan 2025 00:40:38 -0800 Subject: [PATCH 2/4] spam ignore --- subprojects/robotpy-wpiutil/gen/RawFrame.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/subprojects/robotpy-wpiutil/gen/RawFrame.yml b/subprojects/robotpy-wpiutil/gen/RawFrame.yml index 571da3309..0b252e112 100644 --- a/subprojects/robotpy-wpiutil/gen/RawFrame.yml +++ b/subprojects/robotpy-wpiutil/gen/RawFrame.yml @@ -2,5 +2,17 @@ enums: WPI_PixelFormat: + ignore: true WPI_TimestampSource: +# We only care about the enum exposed above. We can safely ignore everything else +functions: + WPI_AllocateRawFrameData: + ignore: true + WPI_FreeRawFrameData: + ignore: true + WPI_SetRawFrameData: + ignore: true +classes: + RawFrame: + ignore: true From 91890fdf54926ba8d7c7fede4fcac145531a5b11 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 2 Jan 2025 07:56:14 -0800 Subject: [PATCH 3/4] Rename enum --- subprojects/robotpy-wpiutil/gen/RawFrame.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/robotpy-wpiutil/gen/RawFrame.yml b/subprojects/robotpy-wpiutil/gen/RawFrame.yml index 0b252e112..06244deaa 100644 --- a/subprojects/robotpy-wpiutil/gen/RawFrame.yml +++ b/subprojects/robotpy-wpiutil/gen/RawFrame.yml @@ -4,6 +4,8 @@ enums: WPI_PixelFormat: ignore: true WPI_TimestampSource: + value_prefix: WPI_TIMESRC + rename: TimestampSource # We only care about the enum exposed above. We can safely ignore everything else functions: From 68b9c4d69839a75dbd0dd1194d5e2d8acf132a54 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 2 Jan 2025 07:56:44 -0800 Subject: [PATCH 4/4] Add times to cscore_cv wrap --- subprojects/robotpy-cscore/gen/cscore_cv.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/robotpy-cscore/gen/cscore_cv.yml b/subprojects/robotpy-cscore/gen/cscore_cv.yml index f264302e1..80e1226a6 100644 --- a/subprojects/robotpy-cscore/gen/cscore_cv.yml +++ b/subprojects/robotpy-cscore/gen/cscore_cv.yml @@ -60,4 +60,5 @@ classes: auto result = self.GrabFrameNoTimeout(image); return std::make_tuple(result, image); } - + LastFrameTime: + LastFrameTimeSource: