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
cc51c1d3
Commit
cc51c1d3
authored
Apr 02, 2017
by
Donald Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yet another guide bar rewrite
parent
4333b50b
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
646 additions
and
519 deletions
+646
-519
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+1
-1
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+380
-6
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+24
-89
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+1
-414
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+228
-0
qmldir
src/FlightDisplay/qmldir
+1
-0
MissionSettingsItem.cc
src/MissionManager/MissionSettingsItem.cc
+0
-3
SliderSwitch.qml
src/QmlControls/SliderSwitch.qml
+2
-1
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+8
-4
Vehicle.cc
src/Vehicle/Vehicle.cc
+0
-1
No files found.
qgroundcontrol.qrc
View file @
cc51c1d3
...
...
@@ -126,6 +126,7 @@
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionsController.qml">src/FlightDisplay/GuidedActionsController.qml</file>
<file alias="QGroundControl/FlightDisplay/MultiVehicleList.qml">src/FlightDisplay/MultiVehicleList.qml</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightMap/CenterMapDropButton.qml">src/FlightMap/Widgets/CenterMapDropButton.qml</file>
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
cc51c1d3
...
...
@@ -220,7 +220,7 @@ bool PX4FirmwarePlugin::supportsManualControl(void)
bool
PX4FirmwarePlugin
::
isCapable
(
const
Vehicle
*
vehicle
,
FirmwareCapabilities
capabilities
)
{
if
(
vehicle
->
multiRotor
())
{
return
(
capabilities
&
(
MavCmdPreflightStorageCapability
|
GuidedModeCapability
|
SetFlightModeCapability
|
PauseVehicleCapability
|
OrbitModeCapability
))
==
capabilities
;
return
(
capabilities
&
(
MavCmdPreflightStorageCapability
|
GuidedModeCapability
|
SetFlightModeCapability
|
PauseVehicleCapability
/*| OrbitModeCapability still NYI*/
))
==
capabilities
;
}
else
{
return
(
capabilities
&
(
MavCmdPreflightStorageCapability
|
GuidedModeCapability
|
SetFlightModeCapability
|
PauseVehicleCapability
))
==
capabilities
;
}
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
cc51c1d3
This diff is collapsed.
Click to expand it.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
cc51c1d3
...
...
@@ -30,7 +30,8 @@ FlightMap {
allowGCSLocationCenter
:
!
userPanned
allowVehicleLocationCenter
:
!
_keepVehicleCentered
property
alias
missionController
:
missionController
property
var
missionController
property
var
guidedActionsController
property
var
flightWidgets
property
var
rightPanelWidth
property
var
qgcView
///< QGCView control which contains this map
...
...
@@ -38,7 +39,6 @@ FlightMap {
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicleCoordinate
:
_activeVehicle
?
_activeVehicle
.
coordinate
:
QtPositioning
.
coordinate
()
property
var
_gotoHereCoordinate
:
QtPositioning
.
coordinate
()
property
int
_retaskSequence
:
0
property
real
_toolButtonTopMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
property
bool
_disableVehicleTracking
:
false
...
...
@@ -124,13 +124,11 @@ FlightMap {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCMapPalette
{
id
:
mapPal
;
lightColors
:
isSatelliteMap
}
MissionController
{
id
:
missionController
Component.onCompleted
:
start
(
false
/* editMode */
)
Connections
{
target
:
missionController
onNewItemsFromVehicle
:
{
var
visualItem
=
missionController
.
visualItems
var
visualItem
s
=
missionController
.
visualItems
if
(
visualItems
&&
visualItems
.
count
!=
1
)
{
mapFitFunctions
.
fitMapViewportToMissionItems
()
firstVehiclePositionReceived
=
true
...
...
@@ -195,50 +193,6 @@ FlightMap {
id
:
_mapTypeButtonsExclusiveGroup
}
ToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.topMargin
:
_toolButtonTopMargin
anchors.top
:
parent
.
top
color
:
qgcPal
.
window
title
:
qsTr
(
"
Fly
"
)
z
:
QGroundControl
.
zOrderWidgets
buttonVisible
:
[
true
,
_showZoom
,
_showZoom
]
maxHeight
:
(
_flightVideo
.
visible
?
_flightVideo
.
y
:
parent
.
height
)
-
toolStrip
.
y
// Massive reach across hack
property
bool
_showZoom
:
!
ScreenTools
.
isMobile
model
:
[
{
name
:
"
Center
"
,
iconSource
:
"
/qmlimages/MapCenter.svg
"
,
dropPanelComponent
:
centerMapDropPanel
},
{
name
:
"
In
"
,
iconSource
:
"
/qmlimages/ZoomPlus.svg
"
},
{
name
:
"
Out
"
,
iconSource
:
"
/qmlimages/ZoomMinus.svg
"
}
]
onClicked
:
{
switch
(
index
)
{
case
1
:
_flightMap
.
zoomLevel
+=
0.5
break
case
2
:
_flightMap
.
zoomLevel
-=
0.5
break
}
}
}
// Toolstrip drop panel compomnents
MapFitFunctions
{
id
:
mapFitFunctions
map
:
_flightMap
...
...
@@ -250,15 +204,6 @@ FlightMap {
property
real
leftToolWidth
:
toolStrip
.
x
+
toolStrip
.
width
}
Component
{
id
:
centerMapDropPanel
CenterMapDropPanel
{
map
:
_flightMap
fitFunctions
:
mapFitFunctions
}
}
// Add trajectory points to the map
MapItemView
{
model
:
_mainIsMap
?
_activeVehicle
?
_activeVehicle
.
trajectoryPoints
:
0
:
0
...
...
@@ -293,11 +238,7 @@ FlightMap {
delegate
:
MissionItemMapVisual
{
map
:
flightMap
onClicked
:
{
_retaskSequence
=
object
.
sequenceNumber
flightWidgets
.
guidedModeBar
.
confirmAction
(
parent
.
flightWidgets
.
guidedModeBar
.
confirmRetask
)
}
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
object
.
sequenceNumber
)
}
}
...
...
@@ -345,30 +286,24 @@ FlightMap {
}
}
MapScale
{
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.66
)
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.33
)
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
mapControl
:
flightMap
visible
:
!
ScreenTools
.
isTinyScreen
}
// Handle guided mode clicks
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
if
(
_activeVehicle
)
{
if
(
flightWidgets
.
guidedModeBar
.
state
!=
"
Shown
"
)
{
flightWidgets
.
guidedModeBar
.
state
=
"
Shown
"
}
else
{
if
(
flightWidgets
.
gotoEnabled
)
{
if
(
guidedActionsController
.
showGotoLocation
)
{
_gotoHereCoordinate
=
flightMap
.
toCoordinate
(
Qt
.
point
(
mouse
.
x
,
mouse
.
y
),
false
/* clipToViewPort */
)
flightWidgets
.
guidedModeBar
.
confirmAction
(
flightWidgets
.
guidedModeBar
.
confirmGoTo
)
}
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionGoto
,
_gotoHereCoordinate
)
}
}
}
MapScale
{
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.66
)
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.33
)
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
mapControl
:
flightMap
visible
:
!
ScreenTools
.
isTinyScreen
}
}
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
cc51c1d3
This diff is collapsed.
Click to expand it.
src/FlightDisplay/GuidedActionsController.qml
0 → 100644
View file @
cc51c1d3
This diff is collapsed.
Click to expand it.
src/FlightDisplay/qmldir
View file @
cc51c1d3
...
...
@@ -4,5 +4,6 @@ FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
GuidedCommands 1.0 GuidedCommands.qml
MultiVehicleList 1.0 MultiVehicleList.qml
src/MissionManager/MissionSettingsItem.cc
View file @
cc51c1d3
...
...
@@ -364,9 +364,6 @@ void MissionSettingsItem::_setDirty(void)
void
MissionSettingsItem
::
setCoordinate
(
const
QGeoCoordinate
&
coordinate
)
{
if
(
coordinate
.
isValid
())
{
qDebug
()
<<
"MissionSettingsItem::setCoordinate"
<<
coordinate
.
isValid
();
}
if
(
_plannedHomePositionCoordinate
!=
coordinate
)
{
_plannedHomePositionCoordinate
=
coordinate
;
emit
coordinateChanged
(
coordinate
);
...
...
src/QmlControls/SliderSwitch.qml
View file @
cc51c1d3
...
...
@@ -11,7 +11,7 @@ Rectangle {
implicitWidth
:
label
.
contentWidth
+
(
_diameter
*
2.5
)
+
(
_border
*
4
)
implicitHeight
:
Math
.
max
(
ScreenTools
.
isMobile
?
ScreenTools
.
minTouchPixels
:
0
,
label
.
height
*
2.5
)
radius
:
height
/
2
color
:
qgcPal
.
window
color
:
qgcPal
.
text
signal
accept
///< Action confirmed
signal
reject
///< Action rejected
...
...
@@ -29,6 +29,7 @@ Rectangle {
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
confirmText
color
:
qgcPal
.
window
}
Rectangle
{
...
...
src/QmlControls/ToolStrip.qml
View file @
cc51c1d3
...
...
@@ -120,6 +120,9 @@ Rectangle {
property
bool
checked
:
false
property
ExclusiveGroup
exclusiveGroup
:
dropButtonsExclusiveGroup
QGCPalette
{
id
:
_repeaterPal
;
colorGroupEnabled
:
_buttonEnabled
}
property
bool
_buttonEnabled
:
_root
.
buttonEnabled
?
_root
.
buttonEnabled
[
index
]
:
true
property
var
_iconSource
:
modelData
.
iconSource
property
var
_alternateIconSource
:
modelData
.
alternateIconSource
property
var
_source
:
(
_root
.
showAlternateIcon
&&
_root
.
showAlternateIcon
[
index
])
?
_alternateIconSource
:
_iconSource
...
...
@@ -160,7 +163,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
width
color
:
checked
?
qgcPal
.
buttonHighlight
:
qgc
Pal
.
button
color
:
checked
?
_repeaterPal
.
buttonHighlight
:
_repeater
Pal
.
button
QGCColoredImage
{
id
:
button
...
...
@@ -170,7 +173,7 @@ Rectangle {
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
color
:
checked
?
qgcPal
.
buttonHighlightText
:
qgc
Pal
.
buttonText
color
:
checked
?
_repeaterPal
.
buttonHighlightText
:
_repeater
Pal
.
buttonText
RotationAnimation
on
rotation
{
id
:
imageRotation
...
...
@@ -199,7 +202,7 @@ Rectangle {
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
height
:
parent
.
height
+
(
_showOptionalElements
?
buttonLabel
.
height
+
buttonColumn
.
spacing
:
0
)
visible
:
_
root
.
buttonEnabled
?
_root
.
buttonEnabled
[
index
]
:
true
visible
:
_
buttonEnabled
preventStealing
:
true
onClicked
:
{
...
...
@@ -233,6 +236,7 @@ Rectangle {
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
modelData
.
name
visible
:
_showOptionalElements
enabled
:
_buttonEnabled
}
}
}
...
...
src/Vehicle/Vehicle.cc
View file @
cc51c1d3
...
...
@@ -1433,7 +1433,6 @@ void Vehicle::setActive(bool active)
QGeoCoordinate
Vehicle
::
homePosition
(
void
)
{
qDebug
()
<<
"Vehicle::homePosition"
<<
_homePosition
.
isValid
();
return
_homePosition
;
}
...
...
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