fix(Vehicle): remove initial connect outer timeouts causing slow-link failures - #15020
Conversation
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 2 passed, 76 failed, 7 skipped. Test Resultslinux-coverage-integration: 52 passed, 0 skipped Code CoverageCoverage: 70.6% No baseline available for comparison Artifact Sizes
Updated: 2026-09-02 03:11:41 UTC • Commit: 85a1c6b • Triggered by: Linux |
e68e145 to
64f4482
Compare
64f4482 to
0ec0001
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 36 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Gimbal/GimbalController.cc:279
- The in-flight guard returns without sending, but both callers still decrement their retry counters unconditionally (
_handleHeartbeatand_checkComplete). While one request is queued or awaiting retries, repeated heartbeat/status messages can therefore exhaust every retry—and with multiple managers, a manager can exhaust its retries without ever issuing a request. Return whether a request was actually submitted and decrement only on success.
if (_pendingInformationRequestCompId != -1) {
qCDebug(GimbalControllerLog) << "_requestGimbalInformation: request already in flight for compid" << _pendingInformationRequestCompId;
return;
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #15020 +/- ##
==========================================
+ Coverage 25.47% 34.50% +9.03%
==========================================
Files 769 945 +176
Lines 65912 85606 +19694
Branches 30495 39453 +8958
==========================================
+ Hits 16788 29538 +12750
+ Misses 37285 36428 -857
- Partials 11839 19640 +7801
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 650 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
0ec0001 to
28948c1
Compare
… failures The fixed outer timeouts on each InitialConnectStateMachine state could fire on slow links (e.g. SiK radios) even though the underlying protocols (ParameterManager, PlanManager, ComponentInformationManager, StandardModes) handle their own timeouts/retries and always signal completion. Force-advancing on timeout left the vehicle half-initialized. ParameterManager gains a terminal initialParametersRequestFailed signal so the Parameters state can advance when the vehicle never answers PARAM_REQUEST_LIST. Also fixes GimbalController sending MAV_CMD_REQUEST_MESSAGE raw, which collided with RequestMessageCoordinator users in the command queue duplicate check and flakily failed the AVAILABLE_MODES fetch. Also improves timeout/failure logging visibility and sanitizes downloaded URL logging.
28948c1 to
85a1c6b
Compare
Problem
Users reported sporadic initial-connect failures over slow links (e.g. SiK radios). The cause is the fixed outer timeouts on each
InitialConnectStateMachinestate (params 60s, comp info 30s, mission 30s, etc.). On slow links these fire even though the transfer is progressing normally. The timeout retry path then force-advanced the machine, leaving the vehicle half-initialized (missing params, modes, or plan).Fix
Remove all outer timeouts and the retry-transition wiring from
InitialConnectStateMachine. Every underlying subsystem already handles its own per-step timeouts/retries and always signals completion:ParameterManagerretries per-param and signalsparametersReadyChanged. A new terminalinitialParametersRequestFailedsignal covers the case where the vehicle never answers PARAM_REQUEST_LIST, so the state advances without parameters instead of relying on an outer timeout.PlanManagerhas per-message timeouts/retries.ComponentInformationManager's nested state machines have per-state timeouts on every step. A newrequestAllCompletesignal replaces the callback plumbing for completion.requestCompleted.RetryableRequestMessageState.Additional fix: GimbalController request collision
GimbalControllersentMAV_CMD_REQUEST_MESSAGE(GIMBAL_MANAGER_INFORMATION) raw viasendMavCommand. The command queue's duplicate-command check ignores param1 (the requested message id), so this flakily collided withRequestMessageCoordinatorusers targeting the same component (e.g. the AVAILABLE_MODES fetch during initial connect), failing them as duplicates. Now routed throughVehicle::requestMessage()with an in-flight guard so it serializes with other request-message users.Supporting changes
StandardModesfailure logs theMAV_RESULTname and failure code and is promoted to warning.ParameterManagerlogging cleanup (cache write log, clearer timeout/cache messages, per-param remap log moved to verbose).QGCFileDownloadlogs URLs with user info/query stripped.bumpAvailableModesMonitorSequence) exercised by a newStandardModesTest.