Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return from estimateCaptureFps after timeout even if no frames are actually captured. #1518

Merged
merged 1 commit into from Feb 6, 2023

Conversation

ian-arkver
Copy link
Contributor

Fixes FPS Test button causing OpenPnP to hang
if camera is lost/unplugged or stops receiving frames.

Description

estimateCameraFps function has a while loop which only exits when the camera indicates it has a new frame.

Assuming hasNewFrame returns false when the camera is unplugged then exiting the while loop when the timeout expires will prevent OpenPnP from hanging endlessly.

Justification

Hopefully fixes bug reported on the Google group.

Instructions for Use

N/A. Problem was seen on loss of camera during an FPS test.

Implementation Details

  1. How did you test the change? Compile tested only - I don't use OpenPnPCaptureCamera and this FPS test is specific to that.
  2. Coding style followed.
  3. No spi or model changes.
  4. Maven tests passed, but don't cover the changed code.

even if no frames are actually captured.

Fixes FPS Test button causing OpenPnP to hang
if camera is lost/unplugged or stops receiving frames.
@markmaker
Copy link
Collaborator

Hi Ian,

Thanks for this! 💯💯💯

_Mark

@markmaker markmaker merged commit f445b26 into openpnp:test Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants