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

CSI Camera Stability #1102

Merged
merged 19 commits into from
Jan 5, 2024
Merged

Conversation

BytingBulldogs3539
Copy link
Contributor

@BytingBulldogs3539 BytingBulldogs3539 commented Jan 2, 2024

Adds logic that will reset the CSI camera in the case that it doesn't receive any new frames from the camera in 3 seconds. This is very helpful for cases where the camera cable was bumped enough to cause a temporary disconnect. Most of the time (if not all the time) the camera needs to be recreated for it to start sending frames again.

Goes with PhotonVision/photon-libcamera-gl-driver#13

Tested on RPI 5 with Pi cam v3. To simulate a disconnect the latch on the CSI port on the back of the camera was left unlatched. To test the disconnect I wiggled the cable. When the camera is disconnect the UI stops receiving new frames. After 3 seconds assuming the camera is reconnected the UI will again start receiving frames when the camera is recreated. The no new frames is logged to the log and the recreate is logged after 3 seconds of no new frames.
image

@BytingBulldogs3539 BytingBulldogs3539 requested a review from a team as a code owner January 2, 2024 03:35
@mcm001
Copy link
Contributor

mcm001 commented Jan 4, 2024

Libcamera-driver needs a bump now that we've merged the native half

@mcm001 mcm001 merged commit 4d9f228 into PhotonVision:master Jan 5, 2024
23 checks passed
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.

2 participants