Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f788d380
Commit
f788d380
authored
Mar 02, 2016
by
Don Gagne
Browse files
Disconnect Vehicle support
parent
903459f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/FlightMap/Widgets/QGCInstrumentWidget.qml
View file @
f788d380
...
...
@@ -131,7 +131,7 @@ Item {
Rectangle
{
anchors.fill
:
_valuesWidget
color
:
_backgroundColor
visible
:
!
_showCompass
&&
_activeVehicle
visible
:
!
_showCompass
radius
:
_spacing
}
...
...
@@ -145,7 +145,6 @@ Item {
}
}
Rectangle
{
id
:
_spacer2
height
:
1
...
...
src/FlightMap/Widgets/ValuesWidget.qml
View file @
f788d380
...
...
@@ -33,7 +33,6 @@ import QGroundControl 1.0
QGCFlickable
{
id
:
_root
visible
:
_activeVehicle
height
:
Math
.
min
(
maxHeight
,
_smallFlow
.
y
+
_smallFlow
.
height
)
contentHeight
:
_smallFlow
.
y
+
_smallFlow
.
height
flickableDirection
:
Flickable
.
VerticalFlick
...
...
@@ -43,7 +42,7 @@ QGCFlickable {
property
color
textColor
property
var
maxHeight
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
disconnectedVehicle
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
...
src/FlightMap/Widgets/VibrationWidget.qml
View file @
f788d380
...
...
@@ -33,7 +33,6 @@ import QGroundControl 1.0
QGCFlickable
{
id
:
_root
visible
:
_activeVehicle
height
:
Math
.
min
(
maxHeight
,
innerItem
.
height
)
contentHeight
:
innerItem
.
height
flickableDirection
:
Flickable
.
VerticalFlick
...
...
@@ -43,7 +42,7 @@ QGCFlickable {
property
color
backgroundColor
property
var
maxHeight
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
disconnectedVehicle
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_barWidth
:
Math
.
round
(
ScreenTools
.
defaultFontPixelWidth
*
3
)
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
f788d380
...
...
@@ -55,7 +55,7 @@ public:
Q_PROPERTY
(
LinkManager
*
linkManager
READ
linkManager
CONSTANT
)
Q_PROPERTY
(
MissionCommands
*
missionCommands
READ
missionCommands
CONSTANT
)
Q_PROPERTY
(
MultiVehicleManager
*
multiVehicleManager
READ
multiVehicleManager
CONSTANT
)
Q_PROPERTY
(
QGCMapEngineManager
*
mapEngineManager
READ
mapEngineManager
CONSTANT
)
Q_PROPERTY
(
QGCMapEngineManager
*
mapEngineManager
READ
mapEngineManager
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
...
...
src/Vehicle/MultiVehicleManager.cc
View file @
f788d380
...
...
@@ -50,6 +50,7 @@ MultiVehicleManager::MultiVehicleManager(QGCApplication* app)
,
_activeVehicleAvailable
(
false
)
,
_parameterReadyVehicleAvailable
(
false
)
,
_activeVehicle
(
NULL
)
,
_disconnectedVehicle
(
NULL
)
,
_firmwarePluginManager
(
NULL
)
,
_autopilotPluginManager
(
NULL
)
,
_joystickManager
(
NULL
)
...
...
@@ -66,6 +67,8 @@ MultiVehicleManager::MultiVehicleManager(QGCApplication* app)
if
(
_gcsHeartbeatEnabled
)
{
_gcsHeartbeatTimer
.
start
();
}
_disconnectedVehicle
=
new
Vehicle
(
this
);
}
void
MultiVehicleManager
::
setToolbox
(
QGCToolbox
*
toolbox
)
...
...
src/Vehicle/MultiVehicleManager.h
View file @
f788d380
...
...
@@ -57,6 +57,9 @@ public:
Q_PROPERTY
(
QmlObjectListModel
*
vehicles
READ
vehicles
CONSTANT
)
Q_PROPERTY
(
bool
gcsHeartBeatEnabled
READ
gcsHeartbeatEnabled
WRITE
setGcsHeartbeatEnabled
NOTIFY
gcsHeartBeatEnabledChanged
)
/// A disconnected vehicle is used to access FactGroup information for the Vehicle object when no active vehicle is available
Q_PROPERTY
(
Vehicle
*
disconnectedVehicle
MEMBER
_disconnectedVehicle
CONSTANT
)
// Methods
Q_INVOKABLE
Vehicle
*
getVehicleById
(
int
vehicleId
);
...
...
@@ -104,6 +107,7 @@ private:
bool
_activeVehicleAvailable
;
///< true: An active vehicle is available
bool
_parameterReadyVehicleAvailable
;
///< true: An active vehicle with ready parameters is available
Vehicle
*
_activeVehicle
;
///< Currently active vehicle from a ui perspective
Vehicle
*
_disconnectedVehicle
;
///< Disconnected vechicle for FactGroup access
QList
<
Vehicle
*>
_vehiclesBeingDeleted
;
///< List of Vehicles being deleted in queued phases
Vehicle
*
_vehicleBeingSetActive
;
///< Vehicle being set active in queued phases
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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