Skip to content

fix(mavlink): MAV_CMD_NAV_DELAY should not be handled as a command - #28236

Merged
MaEtUgR merged 2 commits into
mainfrom
pr_nav_delay_unsupported_cmd
Nov 25, 2026
Merged

MaEtUgR merged 2 commits into
mainfrom
pr_nav_delay_unsupported_cmd

Conversation

@hamishwillee

Copy link
Copy Markdown
Contributor

This fixes the MAV_CMD_NAV_DELAY not providing a NACK or ACK. This was happening because it was in the list of commands handled elsewhere, but it isn't handled anywhere, Worse, it can't be handled as a command - it makes no sense in this context as it is intended to delay a step in a mission.

The fix is simply to remove it from the list of commands so that it falls to the default handler.

Tested, and it now returns unsupported. Claude also deems this good, and as having no side effects.

@hamishwillee
hamishwillee requested a review from MaEtUgR August 13, 2026 06:39
@github-actions github-actions Bot added kind:bug Something is broken or behaving incorrectly. scope:commander Arming, modes, failsafe, health checks, or vehicle state. labels Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Flash and RAM Analysis

Target Flash Δ Flash Total Static RAM Δ Static RAM Total
px4_fmu-v2 (F4) +0 B (+0.00%) 97.73% +0 B (+0.00%) 10.29%
px4_fmu-v5x (F7) -8 B (-0.00%) 96.12% +0 B (+0.00%) 21.95%
px4_fmu-v6x (H7) +0 B (+0.00%) 97.61% +0 B (+0.00%) 10.63%
px4_io-v2 (F1) +0 B (+0.00%) 70.78% +0 B (+0.00%) 54.39%

px4_io-v2 firmware image, which an FMU flashes to its IO at boot: unchanged.

px4_fmu-v2 — Bloaty section/symbol breakdown
     VM SIZE    
 -------------- 
  [ = ]       0    TOTAL

px4_fmu-v5x — Bloaty section/symbol breakdown
     VM SIZE    
 -------------- 
  -0.0%      -8    .text
    +0.2%      +8    Commander::handle_command()
    +1.9%      +4    MissionBlock::issue_command()
    -1.2%      -2    netlib_obtain_ipv4addr
   -20.0%      -2    nsh_system_ctty
    -3.4%      -4    MissionBlock::setLoiterItemFromCurrentPositionWithBraking()
    -0.0%     -12    [section .text]
  -0.0%      -8    TOTAL

px4_fmu-v6x — Bloaty section/symbol breakdown
     VM SIZE    
 -------------- 
  [ = ]       0    TOTAL

px4_io-v2 — Bloaty section/symbol breakdown
     VM SIZE    
 -------------- 
  [ = ]       0    TOTAL

Updated: 2026-11-25T22:42:10

hamishwillee and others added 2 commits November 25, 2026 23:25
…ands

Navigator turned every mission item without a position into a
vehicle_command, NAV_DELAY included, even though the delay is executed
entirely within navigator. Commander only stayed quiet because
VEHICLE_CMD_NAV_DELAY was on its "handled elsewhere" list, which also
stopped it from rejecting the command when a ground station sent it.

Skip NAV_DELAY in issue_command() so commander can reply UNSUPPORTED to
the external command without warning or playing the negative tune
during missions.
@MaEtUgR
MaEtUgR force-pushed the pr_nav_delay_unsupported_cmd branch from b5bbd43 to 2bc1348 Compare November 25, 2026 22:34
@github-actions github-actions Bot added scope:mavlink MAVLink module, streams, commands, or protocol handling. and removed scope:commander Arming, modes, failsafe, health checks, or vehicle state. labels Nov 25, 2026

@MaEtUgR MaEtUgR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well 96458d3184 was adding this exclusion for a reason. The mission command was also published and commander would report unsupported mid mission even though it's the right way of using. So the fix is in my eyes that navigator which handles the command within a mission doesn't publish it as a vehicle_command anymore. Then your removal of exclusion only handles external commands and doesn't break the mission with a delay anymore.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the change addressing standalone delay acknowledgments while preserving local mission-delay handling.

No open issues 🎉

What changed in this PR

Fixes missing acknowledgments for standalone MAV_CMD_NAV_DELAY requests while keeping mission delays handled locally by Navigator.

Changes:

  • Removes delay commands from Commander’s handled-elsewhere list so they reach the unsupported-command handler.
  • Prevents Navigator from publishing mission delays as vehicle commands, preserving local execution and avoiding unnecessary rejection warnings.
File Description
src/​modules/​navigator/​mission_block.cpp Skips command publication for locally executed mission delays.
src/​modules/​commander/​Commander.cpp Allows standalone delay commands to receive an unsupported acknowledgment.

Review effort: Balanced

@MaEtUgR
MaEtUgR merged commit 5de8e5c into main Nov 25, 2026
82 checks passed
@MaEtUgR
MaEtUgR deleted the pr_nav_delay_unsupported_cmd branch November 25, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something is broken or behaving incorrectly. scope:mavlink MAVLink module, streams, commands, or protocol handling. stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants