MAVLink: make MISSION_CURRENT settable via SET_MESSAGE_INTERVAL and silent on high-latency ports - #12035
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR |
PR Summary by QodoMake MISSION_CURRENT configurable per MAVLink port
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
9413a56 to
38406a2
Compare
MISSION_CURRENT was sent by the mission module on a hardcoded 1000 ms timer to every active port. SET_MESSAGE_INTERVAL could not change it, and high-latency ports received it despite only expecting HIGH_LATENCY2. Send it from the per-port periodic scheduler instead, with a fixed 1000 ms default on every port that no data stream rate affects. This makes it configurable via SET/GET_MESSAGE_INTERVAL and REQUEST_MESSAGE, and the high-latency early return now covers it.
38406a2 to
0fb1751
Compare
|
RAM / Flash usage vs. base commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #12035 251 targets built. Find your board's
|
Problem
MISSION_CURRENT(42) was sent bymavlinkMissionUpdate()on a hardcoded 1000 ms timer to every active MAVLink port:SET_MESSAGE_INTERVAL/GET_MESSAGE_INTERVALreturnedMAV_RESULT_UNSUPPORTEDfor it, so a GCS could neither slow it down nor turn it off.mavlinkActivePortMask(), which ignoreshighLatencyEnabled, so high-latency ports received it alongsideHIGH_LATENCY2.Fix
MISSION_CURRENTis now a regular periodic message (MAVLINK_PERIODIC_MESSAGE_MISSION_CURRENT), sent fromprocessMAVLinkTelemetry()per port.MAVLINK_MISSION_CURRENT_INTERVAL_MS), independent of anyREQUEST_DATA_STREAMrate. Existing behaviour doesn't change unless a GCS asks for a different interval.SET_MESSAGE_INTERVAL/GET_MESSAGE_INTERVALwork for it per port (-1disables,0resets to default).MAV_CMD_REQUEST_MESSAGEfor 42 now sends it once.processMAVLinkTelemetry()now covers it.mavlinkMissionUpdate(). Only the send moved, intomavlinkSendMissionCurrent().lastMissionCurrentMsis removed.Testing
SetMessageIntervalControlsMissionCurrentandHighLatencyPortDoesNotSendMissionCurrent. Both fail on the currentmaintenance-10.xand pass with this change.MissionCurrentDefaultIgnoresDataStreamRates: changing the heartbeat stream orMAV_DATA_STREAM_ALLrate leaves MISSION_CURRENT at 1000 ms.mavlink_unittesttests pass.