11 Commits

Author SHA1 Message Date
Matthias Grob
adc9a6d35d Report nav_state of mission executor via MAVLink 2026-02-18 17:37:03 +01:00
Claudio Chies
e52ce5c43b
UAVCAN: Configurable LED Light Control with Flexible Addressing (#26253)
* feat: implement UAVCAN LED control for individual light control and assignment

* uavcan led: nit-picks from review

* uavcan led: reduce maximum number of lights

to avoid unused parameters

* uavcan led: simplify anticolision on check

* uavcan led: correctly map 8-bit RGB to rgb565

* Trim param name character arrays to 17

16 characters + \0 termination

* uavcan led: final nit-picks

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-02-16 18:39:48 +01:00
Michael Schaeuble
d97a8d7d3b mode: control auto set home from an external mode
The mode executor can run land mode which updates the home position to the landing location. This
can be not the desirable behavior and the home position should stay at the original location.

A flag is added to the configuration overrides to control if the home position is updated or not.
2025-11-26 10:16:54 +01:00
Michael Schaeuble
a2299b02c8 modes: make available modes user selectable with a registration option
Some modes should only be run within the context of a mode executor and the user should not be able
to select them in the GCS. With this change, the external component registration request can be
used to set if a mode is selectable or not.
2025-11-26 10:04:53 +01:00
Beat Küng
df11aa1d69 fix commander: handle mode executor correctly on disarm
There were a number of cases where the state was not correct or not as
desired after disarming, when running an external mode 'MyMission' with
executor:
- run MyMission, which triggers Hold, then Land
  - before: Mode: Hold, executor_in_charge: 1
  - after:  Mode: MyMission, executor_in_charge: 1
- run MyMission, then user switches to RTL
  - before: Mode: MyMission, executor_in_charge: 0
  - after:  Mode: MyMission, executor_in_charge: 1
- run MyMission, then while in Hold mode, low battery failsafe (RTL)
  - before: Mode: Hold, executor_in_charge: 1
  - after:  Mode: MyMission, executor_in_charge: 1
- run MyMission, then stop external mode (terminate the process)
  - before: Mode: (mode not available), executor_in_charge: 0
  - after:  Mode: Hold, executor_in_charge: 0

This case is unchanged:
- run MyMission, then low battery failsafe (RTL)
  - before: Mode: MyMission, executor_in_charge: 1
  - after:  Mode: MyMission, executor_in_charge: 1
2025-08-21 10:06:30 +02:00
Beat Küng
f0ecd9e757 fix commander: set failsafe action state immediately after failsafe update
There was a race condition: for example when an external mode disabled
failsafe deferring, that then triggered a failsafe, while the mode executor
immediately sends a command (to e.g. switch modes).
In that case the failsafe got triggered but the mode switch was still
allowed.
This was because of the processing ordering:
- mode updates (and propagating the failsafe_action_active state)
- failsafe updates
- command handling

This patch makes sure failsafe_action_active is set immediately after
updating the failsafes.
2025-07-15 17:18:54 +02:00
Bertug Dilman
a0a2bdaea5
commander: COM_MODE_ARM_CHK parameter to allow mode registration while armed (#24249) 2025-01-28 14:33:15 +01:00
Beat Küng
fb7e973dfd commander: allow external modes to be assigned to RC
Stores a hash of the mode name so that the same mode is always assigned
to the same index independent from registration order.
2023-11-15 13:18:58 +01:00
Beat Küng
bb900264e0 commander+mavlink: implement MAVLink standard modes 2023-11-15 13:18:58 +01:00
Beat Küng
b46e1d744b commander: add config overrides 2023-11-15 13:18:58 +01:00
Beat Küng
fbbccf6997 commander: implement external modes and mode executors 2023-11-15 13:18:58 +01:00