From d80e89b1ff50ddeaba5ae9caa5fc2792e27e7b98 Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Fri, 21 Feb 2020 10:36:26 -0800 Subject: [PATCH] Drive Plan view ROI support from firmware capability bits --- src/FirmwarePlugin/FirmwarePlugin.h | 2 +- src/PlanView/PlanView.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FirmwarePlugin/FirmwarePlugin.h b/src/FirmwarePlugin/FirmwarePlugin.h index 735294e46..3bddb14b9 100644 --- a/src/FirmwarePlugin/FirmwarePlugin.h +++ b/src/FirmwarePlugin/FirmwarePlugin.h @@ -48,7 +48,7 @@ public: GuidedModeCapability = 1 << 2, ///< Vehicle supports guided mode commands OrbitModeCapability = 1 << 3, ///< Vehicle supports orbit mode TakeoffVehicleCapability = 1 << 4, ///< Vehicle supports guided takeoff - ROIModeCapability = 1 << 5, ///< Vehicle supports ROI + ROIModeCapability = 1 << 5, ///< Vehicle supports ROI (both in Fly guided mode and from Plan creation) } FirmwareCapabilities; /// Maps from on parameter name to another diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index 4388433f7..e1457162e 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -617,7 +617,7 @@ Item { name: _missionController.isROIActive ? qsTr("Cancel ROI") : qsTr("ROI"), iconSource: "/qmlimages/MapAddMission.svg", buttonEnabled: true, - buttonVisible: _isMissionLayer, + buttonVisible: _isMissionLayer && _planMasterController.controllerVehicle.roiModeSupported, toggle: !_missionController.isROIActive }, { -- 2.22.0