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
ebfb5af7
Commit
ebfb5af7
authored
Nov 12, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2203 from DonLakeFlyer/ACTweaks
Use vehicle count instead of link count
parents
8e18ba15
92f92abb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
21 deletions
+8
-21
AirframeComponentController.cc
src/AutoPilotPlugins/PX4/AirframeComponentController.cc
+1
-1
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+0
-13
MultiVehicleManager.h
src/Vehicle/MultiVehicleManager.h
+2
-4
MainWindow.cc
src/ui/MainWindow.cc
+1
-1
MultiVehicleDockWidget.cc
src/ui/MultiVehicleDockWidget.cc
+4
-2
No files found.
src/AutoPilotPlugins/PX4/AirframeComponentController.cc
View file @
ebfb5af7
...
...
@@ -98,7 +98,7 @@ AirframeComponentController::~AirframeComponentController()
void
AirframeComponentController
::
changeAutostart
(
void
)
{
if
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
vehicles
().
count
()
>
1
)
{
if
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
vehicles
()
->
count
()
>
1
)
{
QGCMessageBox
::
warning
(
"Airframe Config"
,
"You cannot change airframe configuration while connected to multiple vehicles."
);
return
;
}
...
...
src/Vehicle/MultiVehicleManager.cc
View file @
ebfb5af7
...
...
@@ -246,16 +246,3 @@ Vehicle* MultiVehicleManager::getVehicleById(int vehicleId)
return
NULL
;
}
QList
<
Vehicle
*>
MultiVehicleManager
::
vehicles
(
void
)
{
QList
<
Vehicle
*>
list
;
for
(
int
i
=
0
;
i
<
_vehicles
.
count
();
i
++
)
{
list
+=
qobject_cast
<
Vehicle
*>
(
_vehicles
[
i
]);
}
return
list
;
}
src/Vehicle/MultiVehicleManager.h
View file @
ebfb5af7
...
...
@@ -54,7 +54,7 @@ public:
Q_PROPERTY
(
bool
activeVehicleAvailable
READ
activeVehicleAvailable
NOTIFY
activeVehicleAvailableChanged
)
Q_PROPERTY
(
bool
parameterReadyVehicleAvailable
READ
parameterReadyVehicleAvailable
NOTIFY
parameterReadyVehicleAvailableChanged
)
Q_PROPERTY
(
Vehicle
*
activeVehicle
READ
activeVehicle
WRITE
setActiveVehicle
NOTIFY
activeVehicleChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
vehicles
READ
vehicles
Model
CONSTANT
)
Q_PROPERTY
(
QmlObjectListModel
*
vehicles
READ
vehicles
CONSTANT
)
// Methods
...
...
@@ -70,8 +70,6 @@ public:
UAS
*
activeUas
(
void
)
{
return
_activeVehicle
?
_activeVehicle
->
uas
()
:
NULL
;
}
QList
<
Vehicle
*>
vehicles
(
void
);
// Property accessors
bool
activeVehicleAvailable
(
void
)
{
return
_activeVehicleAvailable
;
}
...
...
@@ -81,7 +79,7 @@ public:
Vehicle
*
activeVehicle
(
void
)
{
return
_activeVehicle
;
}
void
setActiveVehicle
(
Vehicle
*
vehicle
);
QmlObjectListModel
*
vehicles
Model
(
void
)
{
return
&
_vehicles
;
}
QmlObjectListModel
*
vehicles
(
void
)
{
return
&
_vehicles
;
}
// Override from QGCTool
virtual
void
setToolbox
(
QGCToolbox
*
toolbox
);
...
...
src/ui/MainWindow.cc
View file @
ebfb5af7
...
...
@@ -443,7 +443,7 @@ void MainWindow::showStatusBarCallback(bool checked)
void
MainWindow
::
closeEvent
(
QCloseEvent
*
event
)
{
// Disallow window close if there are active connections
if
(
qgcApp
()
->
toolbox
()
->
linkManager
()
->
anyConnectedLinks
())
{
if
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
vehicles
()
->
count
())
{
QGCMessageBox
::
StandardButton
button
=
QGCMessageBox
::
warning
(
tr
(
"QGroundControl close"
),
...
...
src/ui/MultiVehicleDockWidget.cc
View file @
ebfb5af7
...
...
@@ -41,8 +41,10 @@ MultiVehicleDockWidget::MultiVehicleDockWidget(const QString& title, QAction* ac
void
MultiVehicleDockWidget
::
init
(
void
)
{
foreach
(
Vehicle
*
vehicle
,
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
vehicles
())
{
_vehicleAdded
(
vehicle
);
QmlObjectListModel
*
vehicles
=
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
vehicles
();
for
(
int
i
=
0
;
i
<
vehicles
->
count
();
i
++
)
{
_vehicleAdded
(
qobject_cast
<
Vehicle
*>
(
vehicles
->
get
(
i
)));
}
if
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
()
->
activeVehicle
())
{
...
...
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