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
470a46f8
Commit
470a46f8
authored
Feb 17, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Land items default to 0 altitude
parent
4f0562b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+7
-1
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+12
-0
MissionItem.cc
src/MissionManager/MissionItem.cc
+7
-2
No files found.
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
470a46f8
...
...
@@ -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/MissionManager/MavCmdInfoCommon.json
View file @
470a46f8
...
...
@@ -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/MissionItem.cc
View file @
470a46f8
...
...
@@ -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
);
...
...
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