From c5511e09c856ce3292b5b3abd5a7f75aad985aba Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Sun, 9 Aug 2020 10:15:33 -0700 Subject: [PATCH] Update custom example to latest changes --- custom-example/custom.pri | 8 ------- custom-example/qgcresources.qrc | 1 + custom-example/qgroundcontrol.qrc | 13 +++++++---- custom-example/src/CustomPlugin.cc | 8 +++---- .../CustomFirmwarePluginFactory.cc | 23 +++++++++---------- .../CustomFirmwarePluginFactory.h | 6 ++--- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/custom-example/custom.pri b/custom-example/custom.pri index 3acd0820390..c5325f55373 100644 --- a/custom-example/custom.pri +++ b/custom-example/custom.pri @@ -55,14 +55,6 @@ RESOURCES += \ QML_IMPORT_PATH += \ $$PWD/res -LinuxBuild { - - # Our QT_INSTALL_LIBS - QT_LIB_LIST += \ - libQt5VirtualKeyboard.so.5 \ - -} - # Our own, custom sources SOURCES += \ $$PWD/src/CustomPlugin.cc \ diff --git a/custom-example/qgcresources.qrc b/custom-example/qgcresources.qrc index 02caa15f2a8..c0b4815c56d 100644 --- a/custom-example/qgcresources.qrc +++ b/custom-example/qgcresources.qrc @@ -22,6 +22,7 @@ ../resources/gear-black.svg ../resources/gear-white.svg ../resources/helicoptericon.svg + ../resources/BingNoTileBytes.dat ../resources/JoystickBezel.png ../resources/JoystickBezelLight.png ../resources/land.svg diff --git a/custom-example/qgroundcontrol.qrc b/custom-example/qgroundcontrol.qrc index 17049b34814..7af3c9352f9 100644 --- a/custom-example/qgroundcontrol.qrc +++ b/custom-example/qgroundcontrol.qrc @@ -9,7 +9,6 @@ ../src/ui/toolbar/GPSRTKIndicator.qml ../src/ui/toolbar/JoystickIndicator.qml ../src/ui/toolbar/LinkIndicator.qml - ../src/ui/toolbar/MainToolBar.qml ../src/ui/toolbar/MainToolBarIndicators.qml ../src/ui/toolbar/MessageIndicator.qml ../src/ui/toolbar/ModeIndicator.qml @@ -50,7 +49,6 @@ ../src/PlanView/FWLandingPatternEditor.qml ../src/ui/preferences/GeneralSettings.qml ../src/AnalyzeView/GeoTagPage.qml - ../src/FlightMap/Widgets/HealthPageWidget.qml ../src/ui/preferences/HelpSettings.qml ../src/VehicleSetup/JoystickConfig.qml ../src/VehicleSetup/JoystickConfigAdvanced.qml @@ -65,6 +63,7 @@ ../src/AnalyzeView/MAVLinkInspectorPage.qml ../src/ui/preferences/MavlinkSettings.qml ../src/Microhard/MicrohardSettings.qml + ../src/MissionManager/MissionCommandTreeEditorTestWindow.qml ../src/PlanView/MissionSettingsEditor.qml ../src/ui/preferences/MockLink.qml ../src/ui/preferences/MockLinkSettings.qml @@ -77,7 +76,6 @@ ../src/VehicleSetup/PX4FlowSensor.qml ../src/FlightMap/Widgets/QGCInstrumentWidget.qml ../src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml - ../src/QmlControls/QGCViewDialogContainer.qml ../src/AnalyzeView/AnalyzePage.qml ../src/QmlControls/AppMessages.qml ../src/QmlControls/AxisMonitor.qml @@ -107,6 +105,8 @@ ../src/QmlControls/JoystickThumbPad.qml ../src/QmlControls/KMLOrSHPFileDialog.qml ../src/QmlControls/LogReplayStatusBar.qml + ../src/ui/toolbar/MainStatusIndicator.qml + ../src/ui/toolbar/MainToolBar.qml ../src/QmlControls/MainWindowSavedState.qml ../src/QmlControls/MAVLinkChart.qml ../src/QmlControls/MAVLinkMessageButton.qml @@ -161,6 +161,7 @@ ../src/QmlControls/QGCToolBarButton.qml ../src/QmlControls/QGCToolInsets.qml ../src/QmlControls/QGCViewDialog.qml + ../src/QmlControls/QGCViewDialogContainer.qml ../src/QmlControls/QGCViewMessage.qml ../src/QmlControls/QGroundControl/Controls/qmldir ../src/PlanView/RallyPointEditorHeader.qml @@ -179,9 +180,10 @@ ../src/PlanView/SurveyMapVisual.qml ../src/PlanView/TerrainStatus.qml ../src/PlanView/TakeoffItemMapVisual.qml - ../src/ui/toolbar/ToolBarBase.qml ../src/QmlControls/ToolStrip.qml ../src/PlanView/TransectStyleComplexItemStats.qml + ../src/PlanView/TransectStyleComplexItemTabBar.qml + ../src/PlanView/TransectStyleComplexItemTerrainFollow.qml ../src/QmlControls/VehicleRotationCal.qml ../src/QmlControls/VehicleSummaryRow.qml ../src/QmlControls/VerticalFactValueGrid.qml @@ -335,5 +337,8 @@ ../src/comm/APMArduSubMockLink.params ../src/comm/PX4MockLink.params + ../src/comm/MockLink.Version.MetaData.json + ../src/comm/MockLink.Version.MetaData.json.gz + ../src/comm/MockLink.Parameter.MetaData.json diff --git a/custom-example/src/CustomPlugin.cc b/custom-example/src/CustomPlugin.cc index ace69a877a3..b386a51424c 100644 --- a/custom-example/src/CustomPlugin.cc +++ b/custom-example/src/CustomPlugin.cc @@ -159,11 +159,11 @@ bool CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaD if (settingsGroup == AppSettings::settingsGroup) { // This tells QGC than when you are creating Plans while not connected to a vehicle // the specific firmware/vehicle the plan is for. - if (metaData.name() == AppSettings::offlineEditingFirmwareTypeName) { - metaData.setRawDefaultValue(MAV_AUTOPILOT_PX4); + if (metaData.name() == AppSettings::offlineEditingFirmwareClassName) { + metaData.setRawDefaultValue(QGCMAVLink::FirmwareClassPX4); return false; - } else if (metaData.name() == AppSettings::offlineEditingVehicleTypeName) { - metaData.setRawDefaultValue(MAV_TYPE_QUADROTOR); + } else if (metaData.name() == AppSettings::offlineEditingVehicleClassName) { + metaData.setRawDefaultValue(QGCMAVLink::VehicleClassMultiRotor); return false; } } diff --git a/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc b/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc index 36ece796fa7..cf670a3f89d 100644 --- a/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc +++ b/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc @@ -22,11 +22,18 @@ CustomFirmwarePluginFactory::CustomFirmwarePluginFactory() } -QList CustomFirmwarePluginFactory::supportedFirmwareTypes() const +QList CustomFirmwarePluginFactory::supportedFirmwareClasses() const { - QList list; - list.append(MAV_AUTOPILOT_PX4); - return list; + QList firmwareClasses; + firmwareClasses.append(QGCMAVLink::FirmwareClassPX4); + return firmwareClasses; +} + +QList CustomFirmwarePluginFactory::supportedVehicleClasses(void) const +{ + QList vehicleClasses; + vehicleClasses.append(QGCMAVLink::VehicleClassMultiRotor); + return vehicleClasses; } FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPILOT autopilotType, MAV_TYPE /*vehicleType*/) @@ -39,11 +46,3 @@ FirmwarePlugin* CustomFirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTO } return nullptr; } - - -QList CustomFirmwarePluginFactory::supportedVehicleTypes(void) const -{ - QList mavTypes; - mavTypes.append(MAV_TYPE_QUADROTOR); - return mavTypes; -} diff --git a/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h b/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h index ffe39bea686..8a39a3e29b2 100644 --- a/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h +++ b/custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h @@ -26,9 +26,9 @@ class CustomFirmwarePluginFactory : public FirmwarePluginFactory Q_OBJECT public: CustomFirmwarePluginFactory(); - QList supportedFirmwareTypes () const final; - FirmwarePlugin* firmwarePluginForAutopilot (MAV_AUTOPILOT autopilotType, MAV_TYPE vehicleType) final; - QList supportedVehicleTypes (void) const final; + QList supportedFirmwareClasses(void) const final; + QList supportedVehicleClasses(void) const final; + FirmwarePlugin* firmwarePluginForAutopilot (MAV_AUTOPILOT autopilotType, MAV_TYPE vehicleType) final; private: CustomFirmwarePlugin* _pluginInstance;