fix(mavlink): increase command sender list size from 3 to 5

The command sender keeps every outgoing command in a fixed-size list
until it is acked and its 500 ms timeout has passed, or its retries
run out. When the list is full, a new command overwrites the oldest
entry.

With 3 slots, the gimbal manager sequence of acquire control, set
neutral, release control filled the list on its own. Neutral is sent
with target component 0, so it goes out over MAVLink too. Any other
command in that window, e.g. a camera command from a mission,
overwrote a pending gimbal command and dropped its retries.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Miguel Moreira <miguel.moreira@auterion.com>
This commit is contained in:
Miguel Moreira authored and Julian Oes committed 2026-11-27 13:43:20 +13:00
1 parent eb4a78e40c
commit ae4e84e429
7 files changed
+7 -7

No files matched your search

@@ -269,7 +269,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
@@ -261,7 +261,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
@@ -245,7 +245,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
@@ -266,7 +266,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
@@ -266,7 +266,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
@@ -270,7 +270,7 @@
*(.text.nxsem_wait_irq)
*(.text._ZN20MavlinkCommandSender4lockEv)
*(.text._ZThn24_N16ControlAllocator3RunEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi3EE8get_nextEv)
*(.text._ZN15TimestampedListIN20MavlinkCommandSender14command_item_sELi5EE8get_nextEv)
*(.text._ZNK3Ekf21get_ekf_lpos_accuracyEPfS0_)
*(.text._ZN17FlightModeManager17start_flight_taskEv)
*(.text._ZN29MavlinkStreamLocalPositionNED8get_sizeEv)
+1 -1
View File
@@ -124,7 +124,7 @@ private:
#endif
};
TimestampedList<command_item_s, 3> _commands{};
TimestampedList<command_item_s, 5> _commands{};
px4::atomic<int> _num_commands{0}; ///< number of commands in the list, written under the lock, read without it
bool _debug_enabled = false;