Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c5511e09
Commit
c5511e09
authored
Aug 09, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
f62c8640
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
31 deletions
+28
-31
custom.pri
custom-example/custom.pri
+0
-8
qgcresources.qrc
custom-example/qgcresources.qrc
+1
-0
qgroundcontrol.qrc
custom-example/qgroundcontrol.qrc
+9
-4
CustomPlugin.cc
custom-example/src/CustomPlugin.cc
+4
-4
CustomFirmwarePluginFactory.cc
...example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc
+11
-12
CustomFirmwarePluginFactory.h
...-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h
+3
-3
No files found.
custom-example/custom.pri
View file @
c5511e09
...
...
@@ -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 \
...
...
custom-example/qgcresources.qrc
View file @
c5511e09
...
...
@@ -22,6 +22,7 @@
<file alias="gear-black.svg">../resources/gear-black.svg</file>
<file alias="gear-white.svg">../resources/gear-white.svg</file>
<file alias="helicoptericon.svg">../resources/helicoptericon.svg</file>
<file alias="BingNoTileBytes.dat">../resources/BingNoTileBytes.dat</file>
<file alias="JoystickBezel.png">../resources/JoystickBezel.png</file>
<file alias="JoystickBezelLight.png">../resources/JoystickBezelLight.png</file>
<file alias="land.svg">../resources/land.svg</file>
...
...
custom-example/qgroundcontrol.qrc
View file @
c5511e09
...
...
@@ -9,7 +9,6 @@
<file alias="GPSRTKIndicator.qml">../src/ui/toolbar/GPSRTKIndicator.qml</file>
<file alias="JoystickIndicator.qml">../src/ui/toolbar/JoystickIndicator.qml</file>
<file alias="LinkIndicator.qml">../src/ui/toolbar/LinkIndicator.qml</file>
<file alias="MainToolBar.qml">../src/ui/toolbar/MainToolBar.qml</file>
<file alias="MainToolBarIndicators.qml">../src/ui/toolbar/MainToolBarIndicators.qml</file>
<file alias="MessageIndicator.qml">../src/ui/toolbar/MessageIndicator.qml</file>
<file alias="ModeIndicator.qml">../src/ui/toolbar/ModeIndicator.qml</file>
...
...
@@ -50,7 +49,6 @@
<file alias="FWLandingPatternEditor.qml">../src/PlanView/FWLandingPatternEditor.qml</file>
<file alias="GeneralSettings.qml">../src/ui/preferences/GeneralSettings.qml</file>
<file alias="GeoTagPage.qml">../src/AnalyzeView/GeoTagPage.qml</file>
<file alias="HealthPageWidget.qml">../src/FlightMap/Widgets/HealthPageWidget.qml</file>
<file alias="HelpSettings.qml">../src/ui/preferences/HelpSettings.qml</file>
<file alias="JoystickConfig.qml">../src/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">../src/VehicleSetup/JoystickConfigAdvanced.qml</file>
...
...
@@ -65,6 +63,7 @@
<file alias="MAVLinkInspectorPage.qml">../src/AnalyzeView/MAVLinkInspectorPage.qml</file>
<file alias="MavlinkSettings.qml">../src/ui/preferences/MavlinkSettings.qml</file>
<file alias="MicrohardSettings.qml">../src/Microhard/MicrohardSettings.qml</file>
<file alias="MissionCommandTreeEditorTestWindow.qml">../src/MissionManager/MissionCommandTreeEditorTestWindow.qml</file>
<file alias="MissionSettingsEditor.qml">../src/PlanView/MissionSettingsEditor.qml</file>
<file alias="MockLink.qml">../src/ui/preferences/MockLink.qml</file>
<file alias="MockLinkSettings.qml">../src/ui/preferences/MockLinkSettings.qml</file>
...
...
@@ -77,7 +76,6 @@
<file alias="PX4FlowSensor.qml">../src/VehicleSetup/PX4FlowSensor.qml</file>
<file alias="QGCInstrumentWidget.qml">../src/FlightMap/Widgets/QGCInstrumentWidget.qml</file>
<file alias="QGCInstrumentWidgetAlternate.qml">../src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml</file>
<file alias="QGCViewDialogContainer.qml">../src/QmlControls/QGCViewDialogContainer.qml</file>
<file alias="QGroundControl/Controls/AnalyzePage.qml">../src/AnalyzeView/AnalyzePage.qml</file>
<file alias="QGroundControl/Controls/AppMessages.qml">../src/QmlControls/AppMessages.qml</file>
<file alias="QGroundControl/Controls/AxisMonitor.qml">../src/QmlControls/AxisMonitor.qml</file>
...
...
@@ -107,6 +105,8 @@
<file alias="QGroundControl/Controls/JoystickThumbPad.qml">../src/QmlControls/JoystickThumbPad.qml</file>
<file alias="QGroundControl/Controls/KMLOrSHPFileDialog.qml">../src/QmlControls/KMLOrSHPFileDialog.qml</file>
<file alias="QGroundControl/Controls/LogReplayStatusBar.qml">../src/QmlControls/LogReplayStatusBar.qml</file>
<file alias="QGroundControl/Controls/MainStatusIndicator.qml">../src/ui/toolbar/MainStatusIndicator.qml</file>
<file alias="QGroundControl/Controls/MainToolBar.qml">../src/ui/toolbar/MainToolBar.qml</file>
<file alias="QGroundControl/Controls/MainWindowSavedState.qml">../src/QmlControls/MainWindowSavedState.qml</file>
<file alias="QGroundControl/Controls/MAVLinkChart.qml">../src/QmlControls/MAVLinkChart.qml</file>
<file alias="QGroundControl/Controls/MAVLinkMessageButton.qml">../src/QmlControls/MAVLinkMessageButton.qml</file>
...
...
@@ -161,6 +161,7 @@
<file alias="QGroundControl/Controls/QGCToolBarButton.qml">../src/QmlControls/QGCToolBarButton.qml</file>
<file alias="QGroundControl/Controls/QGCToolInsets.qml">../src/QmlControls/QGCToolInsets.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">../src/QmlControls/QGCViewDialog.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialogContainer.qml">../src/QmlControls/QGCViewDialogContainer.qml</file>
<file alias="QGroundControl/Controls/QGCViewMessage.qml">../src/QmlControls/QGCViewMessage.qml</file>
<file alias="QGroundControl/Controls/qmldir">../src/QmlControls/QGroundControl/Controls/qmldir</file>
<file alias="QGroundControl/Controls/RallyPointEditorHeader.qml">../src/PlanView/RallyPointEditorHeader.qml</file>
...
...
@@ -179,9 +180,10 @@
<file alias="QGroundControl/Controls/SurveyMapVisual.qml">../src/PlanView/SurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/TerrainStatus.qml">../src/PlanView/TerrainStatus.qml</file>
<file alias="QGroundControl/Controls/TakeoffItemMapVisual.qml">../src/PlanView/TakeoffItemMapVisual.qml</file>
<file alias="QGroundControl/Controls/ToolBarBase.qml">../src/ui/toolbar/ToolBarBase.qml</file>
<file alias="QGroundControl/Controls/ToolStrip.qml">../src/QmlControls/ToolStrip.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemStats.qml">../src/PlanView/TransectStyleComplexItemStats.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemTabBar.qml">../src/PlanView/TransectStyleComplexItemTabBar.qml</file>
<file alias="QGroundControl/Controls/TransectStyleComplexItemTerrainFollow.qml">../src/PlanView/TransectStyleComplexItemTerrainFollow.qml</file>
<file alias="QGroundControl/Controls/VehicleRotationCal.qml">../src/QmlControls/VehicleRotationCal.qml</file>
<file alias="QGroundControl/Controls/VehicleSummaryRow.qml">../src/QmlControls/VehicleSummaryRow.qml</file>
<file alias="QGroundControl/Controls/VerticalFactValueGrid.qml">../src/QmlControls/VerticalFactValueGrid.qml</file>
...
...
@@ -335,5 +337,8 @@
<qresource prefix="/MockLink">
<file alias="APMArduSubMockLink.params">../src/comm/APMArduSubMockLink.params</file>
<file alias="PX4MockLink.params">../src/comm/PX4MockLink.params</file>
<file alias="Version.MetaData.json">../src/comm/MockLink.Version.MetaData.json</file>
<file alias="Version.MetaData.json.gz">../src/comm/MockLink.Version.MetaData.json.gz</file>
<file alias="Parameter.MetaData.json">../src/comm/MockLink.Parameter.MetaData.json</file>
</qresource>
</RCC>
custom-example/src/CustomPlugin.cc
View file @
c5511e09
...
...
@@ -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
::
offlineEditingFirmware
Type
Name
)
{
metaData
.
setRawDefaultValue
(
MAV_AUTOPILOT_
PX4
);
if
(
metaData
.
name
()
==
AppSettings
::
offlineEditingFirmware
Class
Name
)
{
metaData
.
setRawDefaultValue
(
QGCMAVLink
::
FirmwareClass
PX4
);
return
false
;
}
else
if
(
metaData
.
name
()
==
AppSettings
::
offlineEditingVehicle
Type
Name
)
{
metaData
.
setRawDefaultValue
(
MAV_TYPE_QUADROTOR
);
}
else
if
(
metaData
.
name
()
==
AppSettings
::
offlineEditingVehicle
Class
Name
)
{
metaData
.
setRawDefaultValue
(
QGCMAVLink
::
VehicleClassMultiRotor
);
return
false
;
}
}
...
...
custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc
View file @
c5511e09
...
...
@@ -22,11 +22,18 @@ CustomFirmwarePluginFactory::CustomFirmwarePluginFactory()
}
QList
<
MAV_AUTOPILOT
>
CustomFirmwarePluginFactory
::
supportedFirmwareTyp
es
()
const
QList
<
QGCMAVLink
::
FirmwareClass_t
>
CustomFirmwarePluginFactory
::
supportedFirmwareClass
es
()
const
{
QList
<
MAV_AUTOPILOT
>
list
;
list
.
append
(
MAV_AUTOPILOT_PX4
);
return
list
;
QList
<
QGCMAVLink
::
FirmwareClass_t
>
firmwareClasses
;
firmwareClasses
.
append
(
QGCMAVLink
::
FirmwareClassPX4
);
return
firmwareClasses
;
}
QList
<
QGCMAVLink
::
VehicleClass_t
>
CustomFirmwarePluginFactory
::
supportedVehicleClasses
(
void
)
const
{
QList
<
QGCMAVLink
::
VehicleClass_t
>
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
<
MAV_TYPE
>
CustomFirmwarePluginFactory
::
supportedVehicleTypes
(
void
)
const
{
QList
<
MAV_TYPE
>
mavTypes
;
mavTypes
.
append
(
MAV_TYPE_QUADROTOR
);
return
mavTypes
;
}
custom-example/src/FirmwarePlugin/CustomFirmwarePluginFactory.h
View file @
c5511e09
...
...
@@ -26,9 +26,9 @@ class CustomFirmwarePluginFactory : public FirmwarePluginFactory
Q_OBJECT
public:
CustomFirmwarePluginFactory
();
QList
<
MAV_AUTOPILOT
>
supportedFirmwareTypes
(
)
const
final
;
FirmwarePlugin
*
firmwarePluginForAutopilot
(
MAV_AUTOPILOT
autopilotType
,
MAV_TYPE
vehicleType
)
final
;
QList
<
MAV_TYPE
>
supportedVehicleTypes
(
void
)
const
final
;
QList
<
QGCMAVLink
::
FirmwareClass_t
>
supportedFirmwareClasses
(
void
)
const
final
;
QList
<
QGCMAVLink
::
VehicleClass_t
>
supportedVehicleClasses
(
void
)
const
final
;
FirmwarePlugin
*
firmwarePluginForAutopilot
(
MAV_AUTOPILOT
autopilotType
,
MAV_TYPE
vehicleType
)
final
;
private:
CustomFirmwarePlugin
*
_pluginInstance
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment