Skip to content

Conversation

@xznhj8129
Copy link
Contributor

@xznhj8129 xznhj8129 commented Jan 6, 2026

This is the part 2/3 of syncing MSP capabilities with IPF ops, pull is based on #11147

New Features:

  • MSP2_INAV_FLIGHT_AXIS_ANGLE_OVERRIDE (8726): set per-axis angle overrides (roll/pitch/yaw) via override mask; clamped to angle limits; feeds MSP RC override path.
  • MSP2_INAV_FLIGHT_AXIS_RATE_OVERRIDE (8727): set per-axis rate overrides (roll/pitch/yaw) via override mask; clamped ±2000 dps; feeds MSP RC override path.

These two mirror the IPF axis override and are only active when MSP RC OVERRIDE mode is active; require updating at 5HZ or they will clear, this ensures no lockout. This allows you to directly override and control the angle or rate in any mode via MSP.

  • MSP2_INAV_SET_LOCAL_TARGET (8728): In GCS nav, sets the local body-relative position target in cm
  • MSP2_INAV_LOCAL_TARGET (8729): readback of posControl.desiredState (pos/vel/yaw/climb) in NEU/cm/cm/s/centideg.

These allow setting and reading directly the desired state in a sort of Local poshold control. So if you are in poshold, setting x_cm=100 will set the poshold target 1m to the front, y_cm=-50 will set the poshold target 50cm to your left, z_cm=-100 will set the althold target 1m lower. This allows nav-controlled pos control without using RC or geo coordinates, all using MSP.

  • MSP2_INAV_SET_GLOBAL_TARGET (8730): GCSNAV-only LLH setpoint with datum conversion; terrain rejected; updates XY always, Z only if altitude != 0; mirrors WP#255 “keep altitude” behavior.

This is the most uncertain as they mirror MSP_WP/MSP_SET_WP behavior directly for the poshold controller; i am insure about directly setting it vs using the waypoint control; but if one day there are significant changes it could be worthwhile to have dedicated MSP commands for target position, home, etc.

  • MSP2_INAV_NAV_TARGET (8731): readback of desired LLH (from local+origin), local Z altitude, heading-hold target, climb demand; requires valid origin.

This is a convenient way to get directly the desired geo poshold or WP position at the same time as the target altitude, target heading and target climbrate

Fixes:

  • MSP_SET_HEAD now actually sets heading target like IPF did
  • gen_enum_md: regex now matches tagged enums (typedef enum name { … }) to avoid missing tagged definitions.
  • Deleted the old msp_ref that was full of errors, keeping it just introduced errors

Testing

Using HITL on SBF405WM with MLRS MSP RX; using https://github.com/xznhj8129/mspapi2/tree/refactor to test MSP commands and sequences.
All the commands were verified working in their intended configuration

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@xznhj8129 xznhj8129 changed the base branch from master to maintenance-9.x January 6, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant