feat(manual_control): replace stick override threshold with double-flick gesture (#27041)

* feat(manual_control): trigger RC override on stick velocity

COM_RC_STICK_OV is now a velocity threshold (1/s) instead of a deflection percentage.
Default 3.0, range [1.0, 10.0]. A stick held statically cannot trigger override.

* docs(manual_control): update COM_RC_STICK_OV description for velocity-based override

* feat(manual_control): gate RC override with sign-consistency check

* fix(ManualControl): lower threshold and filter constant for RC override, add tests for MovingDiff

* refactor(commander): merge RC override params into COM_RC_OVR_SPEED

Replace the COM_RC_OVERRIDE bitmask + COM_RC_STICK_OV threshold with a
single float COM_RC_OVR_SPEED (stick override velocity, 0 = disabled).
Override now applies uniformly in auto and offboard modes.

- ManualControl: rename param, treat 0 as disabled (FLT_EPSILON guard)
- Commander: drop the per-mode bitmask gate and the RcOverrideBits enum
- param_translation: migrate COM_RC_OVERRIDE on import (enabled -> 1.0,
  disabled -> 0.0) and drop the unit-incompatible COM_RC_STICK_OV value
- docs: collapse the two params into one across the mode pages

* fix(manual_override): Move configuration to manual_control module

with MAN_OVERRIDE_SPD parameter and a negative value disabling the feature. All other logic stays in Commander.

* docs(releases): add release note for RC override rework (MAN_OVERRIDE_SPD)

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
Gennaro Guidone
2026-07-01 14:59:52 +02:00
committed by GitHub
parent 3b9a5a6ada
commit b8c5f66af0
23 changed files with 182 additions and 121 deletions

View File

@@ -22,7 +22,7 @@ Update these notes with features that are going to be in `main` (PX4 v1.18 or la
## Read Before Upgrading
- TBD
- The RC override parameters `COM_RC_OVERRIDE` and `COM_RC_STICK_OV` are replaced by a single [MAN_OVERRIDE_SPD](../advanced_config/parameter_reference.md#MAN_OVERRIDE_SPD) (minimum stick speed to take over, default `1`; negative disables). `COM_RC_OVERRIDE=0` is migrated to `MAN_OVERRIDE_SPD=-1`. The `COM_RC_STICK_OV` value is not auto-migrated because its unit changed, so re-tune `MAN_OVERRIDE_SPD` if you had customized it.
Please continue reading for [upgrade instructions](#upgrade-guide).
@@ -82,7 +82,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### RC
- TBD
- Merged the RC override parameters `COM_RC_OVERRIDE` and `COM_RC_STICK_OV` into a single [MAN_OVERRIDE_SPD](../advanced_config/parameter_reference.md#MAN_OVERRIDE_SPD) and made override reject erratic signal jumps. ([PX4-Autopilot#27041](https://github.com/PX4/PX4-Autopilot/pull/27041)).
### Multi-Rotor