Video: Broadcast recording and snapshot actions over MAVLink - #2839
Video: Broadcast recording and snapshot actions over MAVLink#2839ArturoManzoli wants to merge 4 commits into
Conversation
a8f56db to
185773e
Compare
|
/review |
Automated PR Re-review 1 (Claude)This is a full initial review — no previous review exists for this PR. This PR adds MAVLink camera control commands (video start/stop capture, image start/stop capture, set camera mode, request capture status) to the vehicle layer, exposes them through the main-vehicle store, and wires them into the video and snapshot stores as an opt-in broadcast behind new 0. SummaryVerdict: MINOR SUGGESTIONS Well-structured PR with clean commit separation and good adherence to project conventions. The MAVLink camera commands are correctly sent fire-and-forget to avoid the ACK-filter timeout, settings use proper Minor items to consider: 1.1, 1.2, 1.3, 4.1, 5.1, 6.1. 1. Correctness & Implementation Bugs1.1 ( 1.2 ( 1.3 ( 2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance4.1 ( 5. UI / UX5.1 ( 6. Code Quality & Style6.1 ( 7. Commit HygieneCommits are well-structured:
Each commit is a single logical change, subjects use appropriate types, and there are no noise commits. Clean. 7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional10.1 ( Generated by Claude. This is advisory; a human reviewer must still approve. |
185773e to
82e0298
Compare
|
Done:
Not addressed:
|
|
/review |
Automated PR Re-review 2 (Claude)Comparing Previous findings status
Discussion since last review@ArturoManzoli provided a detailed comment explaining which findings were addressed and which were intentionally left as-is. The reasoning is clear and sound — 1.1, 1.2, and 4.1 were fixed; 1.3 was acknowledged as harmless noise not worth the refactoring risk; 5.1's blur clamp is functionally sufficient; 6.1 and 10.1 are stylistic choices consistent with the codebase. New findings0. SummaryVerdict: READY TO MERGE The three actionable findings from the initial review (1.1, 1.2, 4.1) have been addressed cleanly. The 1. Correctness & Implementation Bugs — ✅2. AGENTS.md Adherence — ✅3. Security — ✅4. Performance — ✅5. UI / UX — ✅6. Code Quality & Style — ✅7. Commit Hygiene — ✅8. Tests — ✅9. Documentation — ✅10. Nitpicks / Optional — ✅Generated by Claude. This is advisory; a human reviewer must still approve. |
|
Ready to go. |
|
I want to test it with my setup once it's ready. |
It's ready for testing, @joaoantoniocardoso |
rafaellehmkuhl
left a comment
There was a problem hiding this comment.
The PR looks good to me.
@joaoantoniocardoso can will leave the approval to you as you are more familiar with the protocol and has a proper way to test it?
| * @param {number} statusFrequencyHz - Frequency for CAMERA_CAPTURE_STATUS messages while recording (0 to disable) | ||
| * @returns {void} | ||
| */ | ||
| function startVideoCapture(cameraId = 0, streamId = 0, statusFrequencyHz = 0): void { |
There was a problem hiding this comment.
I believe it would be good to rename that one and the others to something like "sendVideoCaptureCommand", so it's not confused with the regular video/snapshot commands.
There was a problem hiding this comment.
I believe it would be good to rename that one and the others to something like "sendVideoCaptureCommand", so it's not confused with the regular video/snapshot commands.
Changed:
startVideoCapture -> sendStartVideoCaptureCommand
stopVideoCapture -> sendStopVideoCaptureCommand
startImageCapture -> sendStartImageCaptureCommand
stopImageCapture -> sendStopImageCaptureCommand
setCameraMode -> sendSetCameraModeCommand
requestCameraCaptureStatus -> sendRequestCameraCaptureStatusCommand
82e0298 to
fa60a91
Compare
|
All good from my side. Will leave the behaviour review with Joao. |
|
Tested. A few observations:
Thanks |
Thanks for the test and feedback Some fixes I've implemented, based on that: 4 - broadcast labeling: the target-camera-id hint in ConfigurationVideoView.vue now spells 6 - capability awareness: on enable / id change / record start, cockpit requests 5 - remote recording state: VIDEO_START_CAPTURE now passes a 2 hz status rate so the recorder a few notes from studying your camera_recording_gate branch:
all still behind the existing opt-in setting, default off. I'l fire up the automated review against the new changes now |
fa60a91 to
6a3ae83
Compare
|
/review |
Automated PR Review — round 3Warning When the operator records a video or takes a snapshot in Cockpit, this PR also asks the vehicle's own camera to do the same thing, so the recording exists on the vehicle as well as on the topside computer. It is off by default and turned on in the video settings, where the operator picks which camera to talk to. The vehicle answers with its own recording state, which the settings panel and a small badge on the recorder widget now show. Round 2 checked only the findings from round 1 and declared the PR ready. This round re-ran the full review over the whole pull request, as the current guidelines require, which is where the two blockers below come from — both are in code that was already present at round 2, not in what was pushed since. What still needs attention
🙋 Decisions for a human1.3 — Duplicate MAVLink broadcast when recording multiple streams
Ticking a box records the decision here; the finding itself closes only on Since round 2 — 5 closed, 1 reclassified, 11 new, comparing 82e0298 → 6a3ae83Range.
Findings that changed status this round
Discussion since the last review
Change map — what was established before judgingClaims (from the PR body and from the author's summary comment; each checked against the code)
Failure site. The PR is a feature, but it does turn on one pre-existing behaviour that reads as a bug: Entry points
Invariants the change relies on, and who can break them:
1. Correctness & Implementation Bugs — 6 findings (2 major, 4 minor)1.4 — Snapshot mirroring can switch a recording camera out of video mode —
if (videoStore.broadcastCameraActionsOverMavlink && succeeded.some((name) => streamNames.includes(name))) {
if (videoStore.setCameraModeOnCapture) {
vehicleStore.sendSetCameraModeCommand(videoStore.mavlinkCameraTargetId, CameraMode.CAMERA_MODE_IMAGE)
}
vehicleStore.sendStartImageCaptureCommand(videoStore.mavlinkCameraTargetId)
}This is the exact counterpart of The staleness indicator does not rescue this either: if the recorder stops cleanly it will report Fix: skip the mode switch while a mirrored recording is believed active ( 1.5 — Camera telemetry cached in the vehicle store and rendered by a mini-widget, bypassing the data lake —
The cost is not only conformance. The PR hand-builds machinery the data lake already has:
Going through the data lake also gets the values into the plotter, the generic indicators, expressions and logging for free — none of which can reach them today. Fix: inject the two message types into the data lake at the interception point, drop 1.6 — A recording can be started on the vehicle and never stopped —
const broadcastRecordingStop = (): void => {
if (!broadcastCameraActionsOverMavlink.value) return
sendStopVideoCaptureCommand(mavlinkCameraTargetId.value, mavlinkVideoStreamId.value)
...
}The guard is symmetric with
Both are more likely than they look, because all five settings are Fix: record what was actually broadcast at start (target component, stream id) and always send the matching stop when that recording ends, regardless of the current setting values — the toggle should gate whether a new broadcast starts, not whether an outstanding one is closed. 1.7 — Feedback is attributed and labelled by component id, not by the configured camera id —
if (cameraId >= 1 && cameraId <= 6) {
return [MavComponent.MAV_COMP_ID_AUTOPILOT1, cameraId]
}
The second half is inherent to the protocol here (a 1.8 — Staleness never fires for a camera that never answers —
const status = remoteCameraCaptureStatus.value
if (!status || !isVideoCaptureActive(status.status.video_status)) return falseThe warning requires a previously received status that reported an active recording. The common failure the reviewer asked about — nothing on the vehicle is listening, MCM is not honouring the id, the recorder is not running — produces no status at all, so @joaoantoniocardoso's item #5 asked for detection of "when it stops working", and this covers the recorder dying mid-recording but not its never having been there — which is the case he actually hit, having had to set the id to 100 by hand. Fix: after 1.3 — Duplicate MAVLink broadcast when recording multiple streams —
Since this was first raised, a start broadcast has grown from one command to up to four ( Fix, if taken: broadcast from 2. Persistence & User Data — inventory, no findingsEvery persisted key the PR touches. All five are new, none is reshaped or removed, and no migration is added.
Judgement: all five carry the One thing to keep in mind rather than fix: because these are vehicle-synced, a second topside computer changing the target camera changes it under the first one mid-recording. That consequence is finding 1.6, not a persistence finding — the backend choice itself is correct. ( 3. AGENTS.md Adherence — 2 findings (2 minor)3.1 — Unrelated re-layout of the video library settings panel —
Fix: drop the move from this PR. If the column layout is wanted, it is a two-line PR of its own that can be judged on its merits. 3.2 — Code added and exported with no call site in this PR —
The author's own summary says the image path is "best-effort for when mcm fills it in", which is the "foundation for the next one" justification the rule names. It lands in the PR that uses it, next to the usage that can be reviewed against it. Fix: delete (Also checked and clean: no new dependencies, 6. UI / UX — 2 findings (1 minor, 1 nit)6.2 — Four house-style breaches on the two new surfaces — Grouped under one finding as the guidelines ask; each sub-item is independently fixable.
(Checked and clean on these surfaces: both new 5.1 — No inline validation feedback on the id fields —
7. Code Quality & Style — 1 finding (1 minor)7.1 — The snapshot broadcast is written inline instead of reusing the recording path's helper —
Fix, which answers both: add a (Also checked: 8. Commit Hygiene — 1 finding (1 minor)8.1 — A later commit relocates code an earlier commit in the same branch introduced —
Fix: squash Related, and folded in here rather than raised twice: the layout move in finding 3.1 rides inside (Also checked and clean: eight commits, all scope-prefixed in this repository's style ( 11. Nitpicks / Optional — 1 finding (1 nit)11.1 —
if (videoStore.remoteCameraCapabilities && !videoStore.remoteCameraCapabilities.supportsVideo) {
Sections with nothing to report (4)4. Security — ✅ (no new dependency in 5. Performance — ✅ (the one addition to the 9. Tests — ✅ (no test file is touched, none removed or weakened; 10. Documentation — ✅ (the Generated by Claude. This is advisory; a human reviewer must still approve. |
6a3ae83 to
ea56c0b
Compare
|
Done:
Not addressed:
|
|
/review |
Automated PR Review — round 4Warning With this feature switched on, Cockpit asks the vehicle's own camera to start recording when the operator starts recording, to stop when they stop, and to take a photo when they take a snapshot, so a copy of the footage exists on the vehicle as well as topside. It is off by default and configured in the video settings, where the operator picks which camera to address. What that camera reports back — whether it is recording, whether it can record, whether it has gone quiet — is shown in the settings panel and as a small badge on the recorder widget. Seven of round 3's thirteen open findings are fixed in code this round, and the fixes were folded into the commits they belong to rather than piled on as follow-ups. What holds the merge is one new blocker created by the new bookkeeping (a mirrored recording that ends by any route other than the Stop button is never stopped on the vehicle, and mirroring then stays off for the rest of the session) plus the data-lake question the author has deferred. What still needs attention
🙋 Decisions for a human1.5 — Camera telemetry cached in the vehicle store and rendered by a mini-widget, bypassing the data lake
3.1 — Unrelated re-layout of the video library settings panel
3.2 — Image-capture readout kept with no consumer (the remaining half of 3.2; the rest was fixed in code)
5.1 — No inline validation feedback on the camera/stream id fields
8.1 — A later commit relocates code an earlier commit in the same branch introduced
Ticking a box records the decision here; each finding itself closes only on Since round 3 — 7 closed, 4 disputed, 2 partly addressed, 3 new, comparing 6a3ae83 → ea56c0bRange.
Findings that changed status this round
Three findings are new this round (1.9, 10.2, 11.2) and are written out in their sections. Discussion since the last review
Change map — what was established before judgingClaims (from the PR body; each checked against the code)
Failure site. The PR is a feature, but it does switch on one pre-existing behaviour that reads as a bug: Entry points
Invariants the change relies on, and who can break them:
1. Correctness & Implementation Bugs — 3 findings (2 major, 1 minor)1.9 — A mirrored recording that ends without passing through
Three consequences follow, in order of severity:
Ordering matters too: Fix at the chokepoint rather than at the three producers: every recording end reaches the recorder's 1.5 — Camera telemetry cached in the vehicle store and rendered by a mini-widget, bypassing the data lake —
The cost is not only conformance — the PR hand-builds machinery that already exists:
Going through the data lake also gets the values into the plotter, the generic indicators, expressions and logging for free — none of which can reach them today. Fix: inject the two message types into the data lake at the interception point, drop 1.8 — "No response" still misses a camera that answered once and then went quiet —
const isRemoteRecordingUnanswered = computed(() => {
const startedAt = remoteRecordingStartedAt.value
if (startedAt === undefined || remoteCameraCaptureStatus.value !== undefined) return false
return isCaptureStatusStale(startedAt, remoteCameraNow.value, CAMERA_CAPTURE_STATUS_STALE_MS)
})This closes the case the finding named — a target that has never answered at all now surfaces as "no response from camera N" in the badge (head ~389) and "no response" in the panel (head ~973). It keys "unanswered" on whether any status is cached for that component, though, not on whether one arrived since this recording started, and the cache only ever accumulates: So the reachable sequence is: recording #1 mirrors correctly and the recorder reports Fix: compare against the start instead of testing for existence — return 2. Persistence & User Data — inventory, no findingsEvery persisted key the PR touches. All five are new, none is reshaped or removed, and no migration is added — unchanged from round 3.
Judgement: all five carry the One thing to keep in mind rather than fix: because these are vehicle-synced, a second topside computer changing the target camera changes it under the first one mid-recording. The stop path now survives that (1.6), and the backend choice itself is correct. ( 3. AGENTS.md Adherence — 2 findings (2 minor)3.2 — Code added and exported with no call site in this PR — Landed this round: Still unused, and the reason this stays open:
Fix, if the change is taken: delete 3.1 — Unrelated re-layout of the video library settings panel —
The author states the move was intentional, to reclaim vertical space. That is a plausible goal and does not answer the objection, which is about where the change is being made rather than whether it is desirable: as its own two-line PR it can be judged on exactly that merit. Left disputed for a maintainer. (Also checked and clean: no new dependencies, 6. UI / UX — 1 finding (1 nit)5.1 — No inline validation feedback on the id fields —
The author states the blur clamp is sufficient, which is defensible — it is a nit and it stays one. It is in the decisions block only because a nit that keeps coming back costs more attention than settling it once. (Checked and clean on these surfaces after this round's changes: the four house-style breaches of 6.2 are fixed — no MAVLink message names in user-facing strings, "MAVLink Camera Manager"/"QGroundControl" spelled out, 8. Commit Hygiene — 1 finding (1 minor)8.1 — A later commit relocates code an earlier commit in the same branch introduced —
The author states that folding the move back would churn the lib commit for no behaviour change. Worth weighing against the fact that this round already rewrote all eight commits, so the rebase in question has just been done once for other reasons. Left disputed for a maintainer. Related, and folded in here rather than raised twice: the layout move in finding 3.1 is not mentioned by any of the eight commit messages, so a modification to existing behaviour is riding inside a feature commit. (Also checked and clean: eight commits, all scope-prefixed in this repository's style ( 10. Documentation — 1 finding (1 nit)10.2 — The PR description no longer matches the code — Two mismatches, both introduced by this round's changes rather than present from the start:
The consequence is small but real: the body is what a reviewer reads first and what the release notes get written from, and it currently promises a command that is not there while saying nothing about the new indicator. The 11. Nitpicks / Optional — 1 finding (1 nit)11.2 — The snapshot caller repeats the broadcast rule the store now owns —
if (videoStore.broadcastCameraActionsOverMavlink && succeeded.some((name) => streamNames.includes(name))) {
videoStore.broadcastSnapshotCapture()
}
Sections with nothing to report (4)4. Security — ✅ (no new dependency — 5. Performance — ✅ (the one addition to the 7. Code Quality & Style — ✅ (7.1 closed by the 9. Tests — ✅ (no test file among the 8 changed files; Generated by Claude. This is advisory; a human reviewer must still approve. |
ea56c0b to
3a4ab88
Compare
|
Done:
Not addressed (recorded as disputes, pending a maintainer
|
|
/review |
Automated PR Review — round 5Warning With this feature switched on, Cockpit asks the vehicle's own camera to start recording when the operator starts recording, to stop when they stop, and to take a photo when they take a snapshot, so a copy of the footage exists on the vehicle as well as topside. It is off by default and configured in the video settings, where the operator picks which camera to address. What that camera reports back — whether it is recording, whether it can record, whether it has gone quiet — is shown in the settings panel and as a small badge on the recorder widget. All four findings that were open on the code are fixed this round, including the blocker: the stop is now mirrored from the recorder's own What still needs attention
🙋 Decisions for a human1.5 — Camera telemetry cached in the vehicle store and rendered by a mini-widget, bypassing the data lake
3.2 — Image-capture readout kept with no consumer
3.1 — Unrelated re-layout of the video library settings panel
8.1 — A later commit relocates code an earlier commit in the same branch introduced
5.1 — No inline validation feedback on the camera/stream id fields
Ticking a box records the decision here; each finding itself closes only on Since round 4 — 4 closed, 1 reclassified, 0 new, comparing ea56c0b → 3a4ab88Range.
Findings that changed status this round
No new findings this round. The whole of Discussion since the last review
Change map — what was established before judgingClaims (from the updated PR body; each checked against the code)
Failure site. The PR is a feature, but it switches on one pre-existing behaviour that reads as a bug: Entry points
Invariants the change relies on, and who can break them:
1. Correctness & Implementation Bugs — 1 finding (1 major, disputed)1.5 — Camera telemetry cached in the vehicle store and rendered by a mini-widget, bypassing the data lake —
The cost is not only conformance — the PR hand-builds machinery that already exists:
Going through the data lake also gets the values into the plotter, the generic indicators, expressions and logging for free — none of which can reach them today. Fix: inject the two message types into the data lake at the interception point, drop 2. Persistence & User Data — inventory, no findingsEvery persisted key the PR touches. All five are new, none is reshaped or removed, and no migration is added — unchanged from round 4.
Judgement: all five carry the One thing to keep in mind rather than fix: because these are vehicle-synced, a second topside computer changing the target camera changes it under the first one mid-recording. The stop path survives that ( ( 3. AGENTS.md Adherence — 2 findings (2 minor, both disputed)3.2 — Code added and exported with no call site in this PR — Landed in round 4 and still true: Still unused, and the reason this stays open:
Fix, if the change is taken: delete 3.1 — Unrelated re-layout of the video library settings panel —
The author states the move was intentional, to reclaim vertical space. That is a plausible goal and does not answer the objection, which is about where the change is being made rather than whether it is desirable: as its own two-line PR it can be judged on exactly that merit. Left disputed for a maintainer. (Also checked and clean: no new dependencies, 6. UI / UX — 1 finding (1 nit, disputed)5.1 — No inline validation feedback on the id fields —
The author states the blur clamp is sufficient, which is defensible — it is a nit and it stays one. It is in the decisions block only because a nit that keeps coming back costs more attention than settling it once. (Checked and clean on these surfaces: no MAVLink message names in user-facing strings, "MAVLink Camera Manager"/"QGroundControl" spelled out, 8. Commit Hygiene — 1 finding (1 minor, disputed)8.1 — A later commit relocates code an earlier commit in the same branch introduced —
The author states that folding the move back would churn the lib commit for no behaviour change. Worth weighing against the fact that rounds 4 and 5 have both rebased this branch — this round rewriting commits 3 through 8 — so the rebase in question has now been done twice for other reasons. Left disputed for a maintainer. Related, and folded in here rather than raised twice: the layout move in finding 3.1 is not mentioned by any of the eight commit messages, so a modification to existing behaviour is riding inside a feature commit. (Also checked and clean: eight commits, all scope-prefixed in this repository's style ( Sections with nothing to report (6)4. Security — ✅ (no new dependency — 5. Performance — ✅ (the one addition to the 7. Code Quality & Style — ✅ ( 9. Tests — ✅ (no test file among the 8 changed files; 10. Documentation — ✅ (10.2 closed — the PR body now matches the six helpers, the interception, the caches, the derived state, the panel readout and the badge; the feature behaves identically in Lite and Standalone since it only sends MAVLink over the existing vehicle connection, so the 11. Nitpicks / Optional — ✅ (11.2 closed; re-read the added TypeScript for the Generated by Claude. This is advisory; a human reviewer must still approve. |
|
/resolve 1.5 deferring the data-lake refactor to a follow-up; dropping the caches/signals for useDataLakeVariable is a larger change kept out of this PR |
|
/resolve 3.1 the video-library re-layout is intentional, to reclaim vertical space |
|
/resolve 3.2 keeping the image best-effort readout to mirror the video path for when recorders start reporting image status |
|
/resolve 5.1 the id fields already clamp to 0-255 on blur, inline validation adds nothing |
|
/resolve 8.1 folding the resolveCameraTarget move back would churn the lib commit for no behavior change |
|
Recorded: ArturoManzoli resolved 1.5. Comment |
|
Recorded: ArturoManzoli resolved 3.1. Comment |
|
Recorded: ArturoManzoli resolved 3.2. Comment |
|
Recorded: ArturoManzoli resolved 5.1. Comment |
|
Recorded: ArturoManzoli resolved 8.1. Comment |
|
/review |
Automated PR Review — round 6Tip ✅ READY TO MERGE — 0 open; 21 closed (5 settled by a maintainer this round, 16 by code changes in earlier rounds). With this feature switched on, Cockpit asks the vehicle's own camera to start recording when the operator starts recording, to stop when they stop, and to take a photo when they take a snapshot, so a copy of the footage exists on the vehicle as well as topside. It is off by default and configured in the video settings, where the operator picks which camera to address. What that camera reports back — whether it is recording, whether it can record, whether it has gone quiet — is shown in the settings panel and as a small badge on the recorder widget. What still needs attentionNothing is open. The five findings the author had argued against were all resolved by a maintainer this round, and re-reviewing the whole diff against every section surfaced nothing new. Since round 5 — 5 resolved, 0 new, head unchanged at 3a4ab88Range. Resolutions applied. Five entries in
That empties the open set, so the verdict follows mechanically: nothing open, New findings. None. The whole of Discussion since the last review
Change map — what was established before judgingClaims (from the PR body; each re-checked against the code this round)
Failure site. The PR is a feature, but it switches on one pre-existing behaviour that reads as a bug: Entry points
Invariants the change relies on, and who can break them:
2. Persistence & User Data — inventory, no findingsEvery persisted key the PR touches. All five are new, none is reshaped or removed, and no migration is added — unchanged from rounds 4 and 5.
Judgement: all five carry the One thing to keep in mind rather than fix: because these are vehicle-synced, a second topside computer changing the target camera changes it under the first one mid-recording. The stop path survives that ( ( Sections with nothing to report (10)1. Correctness & Implementation Bugs — ✅ (re-walked the mirror lifecycle end to end: 3. AGENTS.md Adherence — ✅ (3.1 and 3.2 maintainer-resolved; no new dependency — 4. Security — ✅ (no new dependency and no 5. Performance — ✅ (the one addition to the 6. UI / UX — ✅ (5.1 maintainer-resolved; both new 7. Code Quality & Style — ✅ ( 8. Commit Hygiene — ✅ (8.1 maintainer-resolved; the eight commits in 9. Tests — ✅ (no test file among the 8 changed files; 10. Documentation — ✅ (the PR body still matches the code — same head as round 5, where it was checked line by line against the six helpers, the interception, the caches, the derived state, the panel readout and the badge; the feature behaves identically in Lite and Standalone since it only sends MAVLink over the existing vehicle connection, so the 11. Nitpicks / Optional — ✅ (re-read the added TypeScript for the Generated by Claude. This is advisory; a human reviewer must still approve. |
|
@ArturoManzoli @joaoantoniocardoso this PR looks good already, so I just want us to settle on the broadcast thing. The PR does not introduce any mechanism for mapping streams to MAVLink IDs, which means the only thing we cannot send proper "start THIS stream" messages, so the default is to broadcast instead (ID = 0). The PR also allows the user to change the ID from 0 to something else, but for an user with a single camera this setting adds nothing, and for one with multiple cameras it's a bad UX as well (it has to discover the stream ID and set there every time they start a recording, which kills the "automatic" gain. Is there any other scenario where allowing the user to change that ID makes sense? |
Add fire-and-forget VIDEO_START_CAPTURE, VIDEO_STOP_CAPTURE and IMAGE_START_CAPTURE senders that broadcast to every camera on the vehicle (component id 0), alongside an awaitAck/targetComponent options object on sendCommandLong so these camera commands skip the COMMAND_ACK wait that only the autopilot answers.
Surface thin wrappers over the vehicle's broadcast video and image capture commands so other stores can trigger them without reaching into the vehicle instance directly.
Behind an off-by-default toggle, mirror local recording start/stop and snapshot captures as broadcast MAVLink camera commands so systems like BlueOS can follow the action. Recording several streams collapses to a single start/stop pair, and the stop fires from the recorder's onstop so every recording-end path (manual stop, teardown, dropped link) is covered.
Add a "Broadcast camera actions over MAVLink" checkbox (off by default) to the video library options and log the toggle as a user action, so the broadcast behavior stays opt-in and discoverable.
3a4ab88 to
582c9a0
Compare
As suggested by @joaoantoniocardoso, only the broadcast is now implemented, until we add the rest of the MAVLink camera protocol |
sendCommand/sendCommandLonggain anawaitAckflag (plus a trailingtargetComponent/awaitAckoptions object), so camera commands can be sent fire-and-forget instead of blocking on aCOMMAND_ACKthat Cockpit's autopilot-only ACK filter never surfaces.MAVLinkVehiclegains camera helpers forVIDEO_START/STOP_CAPTURE,IMAGE_START_CAPTURE,SET_CAMERA_MODE,REQUEST_CAMERA_CAPTURE_STATUS, and aREQUEST_MESSAGE-basedCAMERA_INFORMATIONfetch.resolveCameraTargetmaps a configured camera id to the MAVLink target component and camera param (0 broadcasts, 1-6 autopilot-connected, 7-255 dedicated camera component).onIncomingMessageinterceptsCAMERA_CAPTURE_STATUS/CAMERA_INFORMATIONfrom camera components ahead of the autopilot-only component filter and re-emits them as signals.cockpit--prefixed BlueOS-synced settings (master toggle default off, target camera/stream ids, optional set-mode-before-capture and request-capture-status).logUserAction.Closes #2695