From df5e0733352c9f8d6392815d0200fd9ffcfa46a2 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Fri, 16 Sep 2016 13:09:11 -0700 Subject: [PATCH] Only add supported commands --- src/MissionManager/MissionCommandTree.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MissionManager/MissionCommandTree.cc b/src/MissionManager/MissionCommandTree.cc index 2c6e4fed8..fa74a7049 100644 --- a/src/MissionManager/MissionCommandTree.cc +++ b/src/MissionManager/MissionCommandTree.cc @@ -101,6 +101,11 @@ void MissionCommandTree::_collapseHierarchy(Vehicle* _baseVehicleInfo(vehicle, baseFirmwareType, baseVehicleType); foreach (MAV_CMD command, cmdList->commandIds()) { + // Only add supported command to tree (MAV_CMD_NAV_LAST is used for planned home position) + if (!vehicle->firmwarePlugin()->supportedMissionCommands().contains(command) && command != MAV_CMD_NAV_LAST) { + continue; + } + MissionCommandUIInfo* uiInfo = cmdList->getUIInfo(command); if (uiInfo) { if (collapsedTree.contains(command)) { -- 2.22.0