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
f3f54cd5
Commit
f3f54cd5
authored
Mar 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull multiVehicleManager from QGroundControl
parent
dcd55081
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
51 additions
and
51 deletions
+51
-51
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+2
-2
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+2
-2
FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
+1
-1
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+2
-2
QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCInstrumentWidget.qml
+1
-1
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+4
-4
QGCApplication.cc
src/QGCApplication.cc
+0
-1
QGCQuickWidget.cc
src/QGCQuickWidget.cc
+0
-1
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+1
-1
FirmwareUpgrade.qml
src/VehicleSetup/FirmwareUpgrade.qml
+1
-1
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+2
-1
PX4FlowSensor.qml
src/VehicleSetup/PX4FlowSensor.qml
+12
-12
SetupView.qml
src/VehicleSetup/SetupView.qml
+9
-9
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+3
-2
MainWindowInner.qml
src/ui/MainWindowInner.qml
+2
-2
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+2
-2
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+1
-1
MainToolBarIndicators.qml
src/ui/toolbar/MainToolBarIndicators.qml
+6
-6
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
f3f54cd5
...
...
@@ -47,7 +47,7 @@ QGCView {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
property
real
availableHeight
:
parent
.
height
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_mainIsMap
:
QGroundControl
.
loadBoolGlobalSetting
(
_mainIsMapKey
,
true
)
...
...
@@ -121,7 +121,7 @@ QGCView {
}
Connections
{
target
:
multiVehicleManager
target
:
QGroundControl
.
multiVehicleManager
onActiveVehicleChanged
:
px4JoystickCheck
()
}
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
f3f54cd5
...
...
@@ -72,7 +72,7 @@ FlightMap {
// Add trajectory points to the map
MapItemView
{
model
:
_mainIsMap
?
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
trajectoryPoints
:
0
:
0
model
:
_mainIsMap
?
_activeVehicle
?
_
activeVehicle
.
trajectoryPoints
:
0
:
0
delegate
:
MapPolyline
{
line.width
:
3
...
...
@@ -87,7 +87,7 @@ FlightMap {
// Add the vehicles to the map
MapItemView
{
model
:
multiVehicleManager
.
vehicles
model
:
QGroundControl
.
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
...
...
src/FlightDisplay/FlightDisplayViewVideo.qml
View file @
f3f54cd5
...
...
@@ -63,7 +63,7 @@ Item {
pitchAngle: _pitch
width: ScreenTools.defaultFontPixelSize * (30)
height: ScreenTools.defaultFontPixelSize * (30)
active: multiVehicleManager.activeVehicleAvailable
active:
QGroundControl.
multiVehicleManager.activeVehicleAvailable
z: QGroundControl.zOrderWidgets
}
*/
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
f3f54cd5
...
...
@@ -68,7 +68,7 @@ Item {
width
:
parent
.
width
Repeater
{
model
:
multiVehicleManager
.
vehicles
model
:
QGroundControl
.
multiVehicleManager
.
vehicles
delegate
:
QGCLabel
{
...
...
@@ -180,7 +180,7 @@ Item {
text
:
"
Center map on Vehicle
"
enabled
:
_activeVehicle
&&
!
followVehicleCheckBox
.
checked
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
onClicked
:
{
_dropButtonsExclusiveGroup
.
current
=
null
...
...
src/FlightMap/Widgets/QGCInstrumentWidget.qml
View file @
f3f54cd5
...
...
@@ -104,7 +104,7 @@ Item {
opacity
:
0.5
width
:
attitudeWidget
.
width
*
0.15
fillMode
:
Image
.
PreserveAspectFit
visible
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
visible
:
_
activeVehicle
MouseArea
{
anchors.fill
:
parent
...
...
src/MissionEditor/MissionEditor.qml
View file @
f3f54cd5
...
...
@@ -51,7 +51,7 @@ QGCView {
readonly
property
int
_decimalPlaces
:
8
readonly
property
real
_horizontalMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelHeight
/
2
readonly
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
readonly
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
readonly
property
real
_editFieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
16
readonly
property
real
_rightPanelWidth
:
Math
.
min
(
parent
.
width
/
3
,
ScreenTools
.
defaultFontPixelWidth
*
30
)
readonly
property
real
_rightPanelOpacity
:
0.8
...
...
@@ -68,7 +68,7 @@ QGCView {
onActiveVehiclePositionChanged
:
updateMapToVehiclePosition
()
Connections
{
target
:
multiVehicleManager
target
:
QGroundControl
.
multiVehicleManager
onActiveVehicleChanged
:
{
// When the active vehicle changes we need to allow the first vehicle position to move the map again
...
...
@@ -443,7 +443,7 @@ QGCView {
// Add the vehicles to the map
MapItemView
{
model
:
multiVehicleManager
.
vehicles
model
:
QGroundControl
.
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
...
...
@@ -596,7 +596,7 @@ QGCView {
text
:
"
Vehicle
"
enabled
:
activeVehicle
&&
activeVehicle
.
latitude
!=
0
&&
activeVehicle
.
longitude
!=
0
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
_
activeVehicle
onClicked
:
{
centerMapButton
.
hideDropDown
()
...
...
src/QGCApplication.cc
View file @
f3f54cd5
...
...
@@ -483,7 +483,6 @@ bool QGCApplication::_initForNormalAppBoot(void)
#ifdef __mobile__
_qmlAppEngine
=
new
QQmlApplicationEngine
(
this
);
_qmlAppEngine
->
addImportPath
(
"qrc:/qml"
);
_qmlAppEngine
->
rootContext
()
->
setContextProperty
(
"multiVehicleManager"
,
toolbox
()
->
multiVehicleManager
());
_qmlAppEngine
->
rootContext
()
->
setContextProperty
(
"joystickManager"
,
toolbox
()
->
joystickManager
());
_qmlAppEngine
->
load
(
QUrl
(
QStringLiteral
(
"qrc:/qml/MainWindowNative.qml"
)));
#else
...
...
src/QGCQuickWidget.cc
View file @
f3f54cd5
...
...
@@ -41,7 +41,6 @@ QGCQuickWidget::QGCQuickWidget(QWidget* parent) :
{
setAttribute
(
Qt
::
WA_AcceptTouchEvents
);
rootContext
()
->
engine
()
->
addImportPath
(
"qrc:/qml"
);
rootContext
()
->
setContextProperty
(
"multiVehicleManager"
,
qgcApp
()
->
toolbox
()
->
multiVehicleManager
());
rootContext
()
->
setContextProperty
(
"joystickManager"
,
qgcApp
()
->
toolbox
()
->
joystickManager
());
}
...
...
src/QmlControls/ParameterEditor.qml
View file @
f3f54cd5
...
...
@@ -48,7 +48,7 @@ QGCView {
property
bool
_searchFilter
:
false
///< true: showing results of search
property
var
_searchResults
///< List of parameter names from search results
property
string
_currentGroup
:
""
property
bool
_showRCToParam
:
!
ScreenTools
.
isMobile
&&
multiVehicleManager
.
activeVehicle
.
px4Firmware
property
bool
_showRCToParam
:
!
ScreenTools
.
isMobile
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
px4Firmware
ParameterEditorController
{
id
:
controller
;
...
...
src/VehicleSetup/FirmwareUpgrade.qml
View file @
f3f54cd5
...
...
@@ -102,7 +102,7 @@ QGCView {
// Board was found right away, so something is already plugged in before we've started upgrade
statusTextArea
.
append
(
qgcUnplugText1
)
statusTextArea
.
append
(
qgcUnplugText2
)
multiVehicleManager
.
activeVehicle
.
autoDisconnect
=
true
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autoDisconnect
=
true
}
else
{
// We end up here when we detect a board plugged in after we've started upgrade
statusTextArea
.
append
(
highlightPrefix
+
"
Found device
"
+
highlightSuffix
+
"
:
"
+
controller
.
boardType
)
...
...
src/VehicleSetup/JoystickConfig.qml
View file @
f3f54cd5
...
...
@@ -25,6 +25,7 @@ import QtQuick 2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
...
...
@@ -43,7 +44,7 @@ QGCView {
property
bool
controllerCompleted
:
false
property
bool
controllerAndViewReady
:
false
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeJoystick
:
joystickManager
.
activeJoystick
JoystickConfigController
{
...
...
src/VehicleSetup/PX4FlowSensor.qml
View file @
f3f54cd5
...
...
@@ -26,19 +26,19 @@ import QtQuick.Controls 1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
QGCView
{
id
:
qgcView
viewPanel
:
panel
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
panel
.
enabled
}
...
...
src/VehicleSetup/SetupView.qml
View file @
f3f54cd5
...
...
@@ -50,17 +50,17 @@ Rectangle {
readonly
property
string
_armedVehicleText
:
"
This operation cannot be performed while vehicle is armed.
"
property
string
_messagePanelText
:
"
missing message panel text
"
property
bool
_fullParameterVehicleAvailable
:
multiVehicleManager
.
parameterReadyVehicleAvailable
&&
!
multiVehicleManager
.
activeVehicle
.
missingParameters
property
bool
_fullParameterVehicleAvailable
:
QGroundControl
.
multiVehicleManager
.
parameterReadyVehicleAvailable
&&
!
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
missingParameters
function
showSummaryPanel
()
{
if
(
_fullParameterVehicleAvailable
)
{
if
(
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
.
length
==
0
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
.
length
==
0
)
{
panelLoader
.
sourceComponent
=
noComponentsVehicleSummaryComponent
}
else
{
panelLoader
.
source
=
"
VehicleSummary.qml
"
;
}
}
else
if
(
multiVehicleManager
.
parameterReadyVehicleAvailable
)
{
}
else
if
(
QGroundControl
.
multiVehicleManager
.
parameterReadyVehicleAvailable
)
{
panelLoader
.
sourceComponent
=
missingParametersVehicleSummaryComponent
}
else
{
panelLoader
.
sourceComponent
=
disconnectedVehicleSummaryComponent
...
...
@@ -70,7 +70,7 @@ Rectangle {
function
showFirmwarePanel
()
{
if
(
!
ScreenTools
.
isMobile
)
{
if
(
multiVehicleManager
.
activeVehicleAvailable
&&
multiVehicleManager
.
activeVehicle
.
armed
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
sourceComponent
=
messagePanelComponent
}
else
{
...
...
@@ -81,7 +81,7 @@ Rectangle {
function
showJoystickPanel
()
{
if
(
multiVehicleManager
.
activeVehicleAvailable
&&
multiVehicleManager
.
activeVehicle
.
armed
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
&&
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
sourceComponent
=
messagePanelComponent
}
else
{
...
...
@@ -101,7 +101,7 @@ Rectangle {
function
showVehicleComponentPanel
(
vehicleComponent
)
{
if
(
multiVehicleManager
.
activeVehicle
.
armed
&&
!
vehicleComponent
.
allowSetupWhileArmed
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
armed
&&
!
vehicleComponent
.
allowSetupWhileArmed
)
{
_messagePanelText
=
_armedVehicleText
panelLoader
.
sourceComponent
=
messagePanelComponent
}
else
{
...
...
@@ -117,7 +117,7 @@ Rectangle {
Component.onCompleted
:
showSummaryPanel
()
Connections
{
target
:
multiVehicleManager
target
:
QGroundControl
.
multiVehicleManager
onParameterReadyVehicleAvailableChanged
:
{
if
(
parameterReadyVehicleAvailable
||
summaryButton
.
checked
||
setupButtonGroup
.
current
!=
firmwareButton
)
{
...
...
@@ -295,7 +295,7 @@ Rectangle {
Repeater
{
id
:
componentRepeater
model
:
_fullParameterVehicleAvailable
?
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
:
0
model
:
_fullParameterVehicleAvailable
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
:
0
SubMenuButton
{
imageResource
:
modelData
.
iconResource
...
...
@@ -313,7 +313,7 @@ Rectangle {
SubMenuButton
{
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
visible
:
multiVehicleManager
.
parameterReadyVehicleAvailable
visible
:
QGroundControl
.
multiVehicleManager
.
parameterReadyVehicleAvailable
text
:
"
Parameters
"
onClicked
:
showParametersPanel
()
...
...
src/VehicleSetup/VehicleSummary.qml
View file @
f3f54cd5
...
...
@@ -25,6 +25,7 @@ import QtQuick 2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
...
...
@@ -95,7 +96,7 @@ Rectangle {
text
:
setupComplete
?
"
Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component.
"
:
"
WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left.
"
property
bool
setupComplete
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
autopilot
.
setupComplete
:
false
property
bool
setupComplete
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
setupComplete
:
false
}
Flow
{
...
...
@@ -104,7 +105,7 @@ Rectangle {
spacing
:
_summaryBoxSpace
Repeater
{
model
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
:
undefined
model
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
vehicleComponents
:
undefined
// Outer summary item rectangle
Rectangle
{
...
...
src/ui/MainWindowInner.qml
View file @
f3f54cd5
...
...
@@ -53,7 +53,7 @@ Item {
property
var
gcsPosition
:
QtPositioning
.
coordinate
()
// Starts as invalid coordinate
property
var
currentPopUp
:
null
property
real
currentCenterX
:
0
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
formatedMessage
:
activeVehicle
?
activeVehicle
.
formatedMessage
:
""
function
showFlyView
()
{
...
...
@@ -232,7 +232,7 @@ Item {
if
(
currentPopUp
)
{
currentPopUp
.
close
()
}
if
(
multiVehicleManager
.
activeVehicleAvailable
)
{
if
(
QGroundControl
.
multiVehicleManager
.
activeVehicleAvailable
)
{
messageText
.
text
=
activeVehicle
.
formatedMessages
//-- Hack to scroll to last message
for
(
var
i
=
0
;
i
<
activeVehicle
.
messageCount
;
i
++
)
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
f3f54cd5
...
...
@@ -88,9 +88,9 @@ Rectangle {
//-- Mavlink Heartbeats
QGCCheckBox
{
text
:
"
Emit heartbeat
"
checked
:
multiVehicleManager
.
gcsHeartBeatEnabled
checked
:
QGroundControl
.
multiVehicleManager
.
gcsHeartBeatEnabled
onClicked
:
{
multiVehicleManager
.
gcsHeartBeatEnabled
=
checked
QGroundControl
.
multiVehicleManager
.
gcsHeartBeatEnabled
=
checked
}
}
//-----------------------------------------------------------------
...
...
src/ui/toolbar/MainToolBar.qml
View file @
f3f54cd5
...
...
@@ -45,7 +45,7 @@ Rectangle {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
mainWindow
:
null
property
bool
isMessageImportant
:
activeVehicle
?
!
activeVehicle
.
messageTypeNormal
&&
!
activeVehicle
.
messageTypeNone
:
false
property
bool
isBackgroundDark
:
true
...
...
src/ui/toolbar/MainToolBarIndicators.qml
View file @
f3f54cd5
...
...
@@ -322,10 +322,10 @@ Row {
MenuItem
{
checkable
:
true
onTriggered
:
multiVehicleManager
.
activeVehicle
=
vehicle
onTriggered
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
=
vehicle
property
int
vehicleId
:
Number
(
text
.
split
(
"
"
)[
1
])
property
var
vehicle
:
multiVehicleManager
.
getVehicleById
(
vehicleId
)
property
var
vehicle
:
QGroundControl
.
multiVehicleManager
.
getVehicleById
(
vehicleId
)
}
}
...
...
@@ -339,8 +339,8 @@ Row {
vehicleMenuItems
.
length
=
0
// Add new items
for
(
var
i
=
0
;
i
<
multiVehicleManager
.
vehicles
.
count
;
i
++
)
{
var
vehicle
=
multiVehicleManager
.
vehicles
.
get
(
i
)
for
(
var
i
=
0
;
i
<
QGroundControl
.
multiVehicleManager
.
vehicles
.
count
;
i
++
)
{
var
vehicle
=
QGroundControl
.
multiVehicleManager
.
vehicles
.
get
(
i
)
var
menuItem
=
vehicleMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
"
Vehicle
"
+
vehicle
.
id
})
vehicleMenuItems
.
push
(
menuItem
)
vehicleMenu
.
insertItem
(
i
,
menuItem
)
...
...
@@ -350,7 +350,7 @@ Row {
Component.onCompleted
:
updateVehicleMenu
()
Connections
{
target
:
multiVehicleManager
.
vehicles
target
:
QGroundControl
.
multiVehicleManager
.
vehicles
onCountChanged
:
vehicleSelectorButton
.
updateVehicleMenu
()
}
}
...
...
@@ -422,7 +422,7 @@ Row {
Component
.
onCompleted
:
updateFlightModesMenu
()
Connections
{
target
:
multiVehicleManager
target
:
QGroundControl
.
multiVehicleManager
onActiveVehicleChanged
:
flightModeSelector
.
updateFlightModesMenu
}
...
...
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