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
3aef3592
Commit
3aef3592
authored
Feb 17, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2838 from DonLakeFlyer/LandChanges
Bunch 'o Changes
parents
7e1e338a
dfcd2826
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
32 deletions
+82
-32
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+7
-1
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+1
-1
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+14
-0
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+12
-0
MissionController.cc
src/MissionManager/MissionController.cc
+7
-0
MissionController.h
src/MissionManager/MissionController.h
+3
-0
MissionItem.cc
src/MissionManager/MissionItem.cc
+7
-2
DropButton.qml
src/QmlControls/DropButton.qml
+13
-28
RoundButton.qml
src/QmlControls/RoundButton.qml
+18
-0
No files found.
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
3aef3592
...
...
@@ -33,7 +33,13 @@
"description"
:
"Land using VTOL mode."
,
"specifiesCoordinate"
:
true
,
"friendlyEdit"
:
true
,
"category"
:
"VTOL"
"category"
:
"VTOL"
,
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"meters"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
}
]
}
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
3aef3592
...
...
@@ -65,7 +65,7 @@ FlightMap {
delegate
:
MapPolyline
{
line.width
:
3
line.color
:
"
orange
"
line.color
:
"
red
"
z
:
QGroundControl
.
zOrderMapItems
-
1
path
:
[
{
latitude
:
object
.
coordinate1
.
latitude
,
longitude
:
object
.
coordinate1
.
longitude
},
...
...
src/MissionEditor/MissionEditor.qml
View file @
3aef3592
...
...
@@ -426,6 +426,19 @@ QGCView {
model
:
controller
.
waypointLines
}
// Add the vehicles to the map
MapItemView
{
model
:
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
editorMap
.
isSatelliteMap
size
:
ScreenTools
.
defaultFontPixelHeight
*
5
z
:
QGroundControl
.
zOrderMapItems
-
1
}
}
// Mission Item Editor
Item
{
id
:
missionItemEditor
...
...
@@ -518,6 +531,7 @@ QGCView {
z
:
QGroundControl
.
zOrderWidgets
dropDownComponent
:
syncDropDownComponent
enabled
:
!
_syncInProgress
rotateImage
:
_syncInProgress
}
DropButton
{
...
...
src/MissionManager/MavCmdInfoCommon.json
View file @
3aef3592
...
...
@@ -120,6 +120,12 @@
"units"
:
"radians"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"meters"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
},
{
...
...
@@ -290,6 +296,12 @@
"units"
:
"degrees"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
},
"param7"
:
{
"label"
:
"Altitude:"
,
"units"
:
"meters"
,
"default"
:
0.0
,
"decimalPlaces"
:
2
}
},
{
...
...
src/MissionManager/MissionController.cc
View file @
3aef3592
...
...
@@ -762,6 +762,7 @@ void MissionController::_autoSyncSend(void)
void
MissionController
::
_inProgressChanged
(
bool
inProgress
)
{
emit
syncInProgressChanged
(
inProgress
);
if
(
!
inProgress
&&
_queuedSend
)
{
_autoSyncSend
();
}
...
...
@@ -891,3 +892,9 @@ QStringList MissionController::getMobileMissionFiles(void)
return
missionFiles
;
}
bool
MissionController
::
syncInProgress
(
void
)
{
qDebug
()
<<
_activeVehicle
->
missionManager
()
->
inProgress
();
return
_activeVehicle
->
missionManager
()
->
inProgress
();
}
src/MissionManager/MissionController.h
View file @
3aef3592
...
...
@@ -43,6 +43,7 @@ public:
Q_PROPERTY
(
QmlObjectListModel
*
missionItems
READ
missionItems
NOTIFY
missionItemsChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
waypointLines
READ
waypointLines
NOTIFY
waypointLinesChanged
)
Q_PROPERTY
(
bool
autoSync
READ
autoSync
WRITE
setAutoSync
NOTIFY
autoSyncChanged
)
Q_PROPERTY
(
bool
syncInProgress
READ
syncInProgress
NOTIFY
syncInProgressChanged
)
Q_INVOKABLE
void
start
(
bool
editMode
);
Q_INVOKABLE
void
getMissionItems
(
void
);
...
...
@@ -64,12 +65,14 @@ public:
QmlObjectListModel
*
waypointLines
(
void
)
{
return
&
_waypointLines
;
}
bool
autoSync
(
void
)
{
return
_autoSync
;
}
void
setAutoSync
(
bool
autoSync
);
bool
syncInProgress
(
void
);
signals:
void
missionItemsChanged
(
void
);
void
waypointLinesChanged
(
void
);
void
autoSyncChanged
(
bool
autoSync
);
void
newItemsFromVehicle
(
void
);
void
syncInProgressChanged
(
bool
syncInProgress
);
private
slots
:
void
_newMissionItemsAvailableFromVehicle
();
...
...
src/MissionManager/MissionItem.cc
View file @
3aef3592
...
...
@@ -329,7 +329,7 @@ void MissionItem::_setupMetaData(void)
if
(
!
_altitudeMetaData
)
{
_altitudeMetaData
=
new
FactMetaData
(
FactMetaData
::
valueTypeDouble
);
_altitudeMetaData
->
setRawUnits
(
"meters"
);
_altitudeMetaData
->
setDecimalPlaces
(
3
);
_altitudeMetaData
->
setDecimalPlaces
(
2
);
enumStrings
.
clear
();
enumValues
.
clear
();
...
...
@@ -620,6 +620,7 @@ QmlObjectListModel* MissionItem::textFieldFacts(void)
Fact
*
rgParamFacts
[
7
]
=
{
&
_param1Fact
,
&
_param2Fact
,
&
_param3Fact
,
&
_param4Fact
,
&
_param5Fact
,
&
_param6Fact
,
&
_param7Fact
};
FactMetaData
*
rgParamMetaData
[
7
]
=
{
&
_param1MetaData
,
&
_param2MetaData
,
&
_param3MetaData
,
&
_param4MetaData
,
&
_param5MetaData
,
&
_param6MetaData
,
&
_param7MetaData
};
bool
altitudeAdded
=
false
;
for
(
int
i
=
1
;
i
<=
7
;
i
++
)
{
const
QMap
<
int
,
MavCmdParamInfo
*>&
paramInfoMap
=
_missionCommands
->
getMavCmdInfo
(
command
,
_vehicle
)
->
paramInfoMap
();
...
...
@@ -634,10 +635,14 @@ QmlObjectListModel* MissionItem::textFieldFacts(void)
paramMetaData
->
setRawUnits
(
paramInfo
->
units
());
paramFact
->
setMetaData
(
paramMetaData
);
model
->
append
(
paramFact
);
if
(
i
==
7
)
{
altitudeAdded
=
true
;
}
}
}
if
(
specifiesCoordinate
())
{
if
(
specifiesCoordinate
()
&&
!
altitudeAdded
)
{
_param7Fact
.
_setName
(
"Altitude:"
);
_param7Fact
.
setMetaData
(
_altitudeMetaData
);
model
->
append
(
&
_param7Fact
);
...
...
src/QmlControls/DropButton.qml
View file @
3aef3592
...
...
@@ -9,7 +9,8 @@ Item {
id
:
_root
signal
clicked
()
property
alias
buttonImage
:
button
.
source
property
alias
buttonImage
:
roundButton
.
buttonImage
property
alias
rotateImage
:
roundButton
.
rotateImage
property
real
radius
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
property
int
dropDirection
:
dropDown
property
alias
dropDownComponent
:
dropDownLoader
.
sourceComponent
...
...
@@ -38,7 +39,7 @@ Item {
// Set up ExclusiveGroup support. We use the checked property to drive visibility of drop down.
property
bool
checked
:
false
property
alias
checked
:
roundButton
.
checked
property
ExclusiveGroup
exclusiveGroup
:
null
onExclusiveGroupChanged
:
{
...
...
@@ -77,7 +78,7 @@ Item {
dropItemHolderRect
.
y
=
0
}
else
{
dropDownItem
.
y
=
b
utton
.
height
+
_dropMargin
dropDownItem
.
y
=
roundB
utton
.
height
+
_dropMargin
dropItemHolderRect
.
y
=
_arrowPointHeight
}
...
...
@@ -87,7 +88,7 @@ Item {
dropDownItem
.
x
=
Math
.
min
(
dropDownItem
.
x
+
dropDownItem
.
width
,
_viewportMaxRight
)
-
dropDownItem
.
width
// Arrow points
arrowCanvas
.
arrowPoint
.
x
=
(
b
utton
.
x
+
radius
)
-
dropDownItem
.
x
arrowCanvas
.
arrowPoint
.
x
=
(
roundB
utton
.
x
+
radius
)
-
dropDownItem
.
x
if
(
dropDirection
==
dropUp
)
{
arrowCanvas
.
arrowPoint
.
y
=
dropDownItem
.
height
arrowCanvas
.
arrowBase1
.
x
=
arrowCanvas
.
arrowPoint
.
x
-
(
_arrowBaseWidth
/
2
)
...
...
@@ -113,7 +114,7 @@ Item {
dropItemHolderRect
.
x
=
0
}
else
{
dropDownItem
.
x
=
b
utton
.
width
+
_dropMargin
dropDownItem
.
x
=
roundB
utton
.
width
+
_dropMargin
dropItemHolderRect
.
x
=
_arrowPointHeight
}
...
...
@@ -123,7 +124,7 @@ Item {
dropDownItem
.
y
=
Math
.
min
(
dropDownItem
.
y
+
dropDownItem
.
height
,
_viewportMaxBottom
)
-
dropDownItem
.
height
// Arrow points
arrowCanvas
.
arrowPoint
.
y
=
(
b
utton
.
y
+
radius
)
-
dropDownItem
.
y
arrowCanvas
.
arrowPoint
.
y
=
(
roundB
utton
.
y
+
radius
)
-
dropDownItem
.
y
if
(
dropDirection
==
dropLeft
)
{
arrowCanvas
.
arrowPoint
.
x
=
dropDownItem
.
width
arrowCanvas
.
arrowBase1
.
x
=
arrowCanvas
.
arrowPoint
.
x
-
_arrowPointHeight
...
...
@@ -155,29 +156,13 @@ Item {
}
}
// Button
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
border.width
:
ScreenTools
.
defaultFontPixelHeight
*
0.0625
border.color
:
"
white
"
color
:
checked
?
qgcPal
.
mapButtonHighlight
:
qgcPal
.
mapButton
RoundButton
{
id
:
roundButton
radius
:
parent
.
width
/
2
Image
{
id
:
button
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
checked
=
!
checked
_root
.
clicked
()
}
}
}
// Image - button
onClicked
:
{
_root
.
clicked
()
}
}
Item
{
...
...
src/QmlControls/RoundButton.qml
View file @
3aef3592
...
...
@@ -11,6 +11,7 @@ Item {
signal
clicked
()
property
alias
buttonImage
:
button
.
source
property
real
radius
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
property
bool
rotateImage
:
false
width
:
radius
*
2
height
:
radius
*
2
...
...
@@ -26,6 +27,15 @@ Item {
}
}
onRotateImageChanged
:
{
if
(
rotateImage
)
{
imageRotation
.
running
=
true
}
else
{
imageRotation
.
running
=
false
button
.
rotation
=
0
}
}
Rectangle
{
anchors.fill
:
parent
radius
:
width
/
2
...
...
@@ -39,6 +49,14 @@ Item {
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
RotationAnimation
on
rotation
{
id
:
imageRotation
loops
:
Animation
.
Infinite
from
:
0
to
:
360
duration
:
500
running
:
false
}
MouseArea
{
anchors.fill
:
parent
...
...
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