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
f6a19404
Unverified
Commit
f6a19404
authored
5 years ago
by
Gus Grubba
Committed by
GitHub
5 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7505 from mavlink/multipleVehicleTypes
Multiple vehicle types
parents
58227dfd
cfe602e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
7 deletions
+22
-7
FirmwarePluginManager.cc
src/FirmwarePlugin/FirmwarePluginManager.cc
+2
-2
PX4FirmwarePluginFactory.cc
src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.cc
+2
-2
MissionSettingsEditor.qml
src/PlanView/MissionSettingsEditor.qml
+3
-2
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+12
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+3
-1
No files found.
src/FirmwarePlugin/FirmwarePluginManager.cc
View file @
f6a19404
...
...
@@ -16,7 +16,7 @@
FirmwarePluginManager
::
FirmwarePluginManager
(
QGCApplication
*
app
,
QGCToolbox
*
toolbox
)
:
QGCTool
(
app
,
toolbox
)
,
_genericFirmwarePlugin
(
NULL
)
,
_genericFirmwarePlugin
(
nullptr
)
{
}
...
...
@@ -58,7 +58,7 @@ QList<MAV_TYPE> FirmwarePluginManager::supportedVehicleTypes(MAV_AUTOPILOT firmw
FirmwarePlugin
*
FirmwarePluginManager
::
firmwarePluginForAutopilot
(
MAV_AUTOPILOT
firmwareType
,
MAV_TYPE
vehicleType
)
{
FirmwarePluginFactory
*
factory
=
_findPluginFactory
(
firmwareType
);
FirmwarePlugin
*
plugin
=
NULL
;
FirmwarePlugin
*
plugin
=
nullptr
;
if
(
factory
)
{
plugin
=
factory
->
firmwarePluginForAutopilot
(
firmwareType
,
vehicleType
);
...
...
This diff is collapsed.
Click to expand it.
src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.cc
View file @
f6a19404
...
...
@@ -16,7 +16,7 @@
PX4FirmwarePluginFactory
PX4FirmwarePluginFactory
;
PX4FirmwarePluginFactory
::
PX4FirmwarePluginFactory
(
void
)
:
_pluginInstance
(
NULL
)
:
_pluginInstance
(
nullptr
)
{
}
...
...
@@ -40,5 +40,5 @@ FirmwarePlugin* PX4FirmwarePluginFactory::firmwarePluginForAutopilot(MAV_AUTOPIL
return
_pluginInstance
;
}
return
NULL
;
return
nullptr
;
}
This diff is collapsed.
Click to expand it.
src/PlanView/MissionSettingsEditor.qml
View file @
f6a19404
...
...
@@ -30,6 +30,7 @@ Rectangle {
property
bool
_showCruiseSpeed
:
!
_missionVehicle
.
multiRotor
property
bool
_showHoverSpeed
:
_missionVehicle
.
multiRotor
||
_missionVehicle
.
vtol
property
bool
_multipleFirmware
:
QGroundControl
.
supportedFirmwareCount
>
2
property
bool
_multipleVehicleTypes
:
QGroundControl
.
supportedVehicleCount
>
1
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
property
bool
_mobile
:
ScreenTools
.
isMobile
property
var
_savePath
:
QGroundControl
.
settingsManager
.
appSettings
.
missionSavePath
...
...
@@ -158,13 +159,13 @@ Rectangle {
QGCLabel
{
text
:
_vehicleLabel
Layout.fillWidth
:
true
visible
:
_
showOfflineVehicleCombo
s
visible
:
_
multipleVehicleType
s
}
FactComboBox
{
fact
:
QGroundControl
.
settingsManager
.
appSettings
.
offlineEditingVehicleType
indexModel
:
false
Layout.preferredWidth
:
_fieldWidth
visible
:
_
showOfflineVehicleCombo
s
visible
:
_
multipleVehicleType
s
enabled
:
_enableOfflineVehicleCombos
}
...
...
This diff is collapsed.
Click to expand it.
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
f6a19404
...
...
@@ -190,6 +190,18 @@ int QGroundControlQmlGlobal::supportedFirmwareCount()
return
_firmwarePluginManager
->
supportedFirmwareTypes
().
count
();
}
int
QGroundControlQmlGlobal
::
supportedVehicleCount
()
{
int
count
=
0
;
QList
<
MAV_AUTOPILOT
>
list
=
_firmwarePluginManager
->
supportedFirmwareTypes
();
foreach
(
auto
firmware
,
list
)
{
if
(
firmware
!=
MAV_AUTOPILOT_GENERIC
)
{
count
+=
_firmwarePluginManager
->
supportedVehicleTypes
(
firmware
).
count
();
}
}
return
count
;
}
bool
QGroundControlQmlGlobal
::
px4ProFirmwareSupported
()
{
return
_firmwarePluginManager
->
supportedFirmwareTypes
().
contains
(
MAV_AUTOPILOT_PX4
);
...
...
This diff is collapsed.
Click to expand it.
src/QmlControls/QGroundControlQmlGlobal.h
View file @
f6a19404
...
...
@@ -77,8 +77,9 @@ public:
Q_PROPERTY
(
bool
microhardSupported
READ
microhardSupported
CONSTANT
)
Q_PROPERTY
(
int
supportedFirmwareCount
READ
supportedFirmwareCount
CONSTANT
)
Q_PROPERTY
(
int
supportedVehicleCount
READ
supportedVehicleCount
CONSTANT
)
Q_PROPERTY
(
bool
px4ProFirmwareSupported
READ
px4ProFirmwareSupported
CONSTANT
)
Q_PROPERTY
(
int
apmFirmwareSupported
READ
apmFirmwareSupported
CONSTANT
)
Q_PROPERTY
(
int
apmFirmwareSupported
READ
apmFirmwareSupported
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderTopMost
READ
zOrderTopMost
CONSTANT
)
///< z order for top most items, toolbar, main window sub view
Q_PROPERTY
(
qreal
zOrderWidgets
READ
zOrderWidgets
CONSTANT
)
///< z order value to widgets, for example: zoom controls, hud widgetss
...
...
@@ -203,6 +204,7 @@ public:
#endif
int
supportedFirmwareCount
();
int
supportedVehicleCount
();
bool
px4ProFirmwareSupported
();
bool
apmFirmwareSupported
();
bool
skipSetupPage
()
{
return
_skipSetupPage
;
}
...
...
This diff is collapsed.
Click to expand it.
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