[Stable V5.0] Camera backports#13342
Merged
DonLakeFlyer merged 8 commits intoStable_V5.0from Sep 15, 2025
Merged
Conversation
This is an attempt to fix some of the corner cases trying to discover cameras, namely: - Implement missing retries for CAMERA_INFORMATION, us old specific commands and REQUEST_MESSAGE. - Try to simplify CameraControl::_initWhenReady a bit. - Fix _requestStreamInfo() and _requestStreamStatus() using wrong retry variable. - Add a few missing timers.
The logic was spread across 3 functions, we can actually remove a bit of this duplication.
This makes us retry to discover a camera if it disappears after not having been connected previously (for whatever reason).
In case a camera takes a while to properly respond, it's useful to wait a while with retries while also not spamming the component with commands the whole time. Therefore, retry with exponential backoff should do the job.
- Fix missing retry counter reset in handleCaptureStatus() - Fix missing timer stop in handleCaptureStatus() - Consolidate inconsistent counter usage for REQUEST_CAMERA_CAPTURE_STATUS - Standardize all retry limits to 6 attempts (was mixed 5/6) - Standardize all retry timeouts to 1000ms (was mixed 500ms/1000ms) - Standardize video stream info retry factor from 5 to 6 (_expectedCount * 6) - Standardize _initWhenReady timing to consistent 500ms spacing - Add consistent debug logging across all request functions - Verify all success handlers properly stop timers and reset counters - Ensure all requests use proper alternating message patterns
This fixes the unittests segfaulting.
* VideoManager: fix crash on camera disconnect This fixes a segfault in: src/VideoManager/VideoManager.cc:551 MavlinkCameraControl *pCamera = _activeVehicle->cameraManager()->currentCameraInstance(); * FlightMap: drive-by bugfix --------- Co-authored-by: Holden Ramsey <68555040+HTRamsey@users.noreply.github.com>
Collaborator
|
Thanks Julian |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contains:
What else should be included?