Add NT controlled framerate limiter (#2257)

Adds a method to lower the speed of a pipeline over NT, primarily to
reduce power consumption.
This commit is contained in:
Sam Freund
2025-12-29 23:01:10 -06:00
committed by GitHub
parent fddff5dbca
commit 80d3efe00e
16 changed files with 234 additions and 15 deletions

View File

@@ -103,6 +103,16 @@ class PhotonCamera {
*/
bool GetDriverMode() const;
/**
* @param fpsLimit The FPS limit to set. Use -1 for unlimited FPS.
*/
void SetFPSLimit(int fpsLimit);
/**
* @return The FPS limit set on the camera, or -1 if no limit is set.
*/
int GetFPSLimit() const;
/**
* Request the camera to save a new image file from the input
* camera stream with overlays.
@@ -210,6 +220,9 @@ class PhotonCamera {
nt::BooleanSubscriber driverModeSubscriber;
nt::BooleanPublisher driverModePublisher;
nt::IntegerSubscriber fpsLimitSubscriber;
nt::IntegerPublisher fpsLimitPublisher;
nt::IntegerSubscriber ledModeSubscriber;
nt::IntegerSubscriber heartbeatSubscriber;