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
ecf3d85b
Commit
ecf3d85b
authored
Mar 03, 2017
by
Don Gagne
Committed by
GitHub
Mar 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4693 from DonLakeFlyer/FWLandingUpdates
Fw landing updates
parents
a9de4cf7
419f8a89
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
86 deletions
+12
-86
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+7
-71
FWLandingPattern.FactMetaData.json
src/MissionManager/FWLandingPattern.FactMetaData.json
+2
-2
FixedWingLandingComplexItem.cc
src/MissionManager/FixedWingLandingComplexItem.cc
+2
-2
MissionController.cc
src/MissionManager/MissionController.cc
+0
-10
SimpleMissionItem.h
src/MissionManager/SimpleMissionItem.h
+1
-1
No files found.
src/MissionEditor/MissionEditor.qml
View file @
ecf3d85b
...
...
@@ -248,13 +248,9 @@ QGCView {
id
:
_mapTypeButtonsExclusiveGroup
}
ExclusiveGroup
{
id
:
_dropButtonsExclusiveGroup
}
function
setCurrentItem
(
sequenceNumber
)
{
if
(
sequenceNumber
!==
_currentMissionIndex
)
{
//editorMap.polygonDraw.cancelPolygonEdit(
)
console
.
log
(
"
setCurrentItem
"
,
sequenceNumber
)
_currentMissionItem
=
undefined
_currentMissionIndex
=
-
1
for
(
var
i
=
0
;
i
<
_visualItems
.
count
;
i
++
)
{
...
...
@@ -457,59 +453,6 @@ QGCView {
}
}
Component
{
id
:
missionItemComponent
MissionItemIndicator
{
id
:
itemIndicator
coordinate
:
object
.
coordinate
visible
:
object
.
isSimpleItem
&&
object
.
specifiesCoordinate
z
:
QGroundControl
.
zOrderMapItems
missionItem
:
object
sequenceNumber
:
object
.
sequenceNumber
//-- If you don't want to allow selecting items beneath the
// toolbar, the code below has to check and see if mouse.y
// is greater than (map.height - ScreenTools.availableHeight)
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
function
updateItemIndicator
()
{
if
(
object
.
isCurrentItem
&&
itemIndicator
.
visible
&&
object
.
specifiesCoordinate
&&
object
.
isSimpleItem
)
{
// Setup our drag item
itemDragger
.
visible
=
true
itemDragger
.
coordinateItem
=
Qt
.
binding
(
function
()
{
return
object
})
itemDragger
.
mapCoordinateIndicator
=
Qt
.
binding
(
function
()
{
return
itemIndicator
})
}
}
Connections
{
target
:
object
onIsCurrentItemChanged
:
updateItemIndicator
()
onSpecifiesCoordinateChanged
:
updateItemIndicator
()
}
// These are the non-coordinate child mission items attached to this item
Row
{
anchors.top
:
parent
.
top
anchors.left
:
parent
.
right
Repeater
{
model
:
object
.
isSimpleItem
?
object
.
childItems
:
0
delegate
:
MissionItemIndexLabel
{
label
:
object
.
abbreviation
checked
:
object
.
isCurrentItem
z
:
2
specifiesCoordinate
:
false
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
}
}
}
}
}
// Add lines between waypoints
MissionLineView
{
model
:
_editingLayer
==
_layerMission
?
missionController
.
waypointLines
:
undefined
...
...
@@ -635,9 +578,13 @@ QGCView {
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
onRemove
:
{
var
removeIndex
=
index
itemDragger
.
clearItem
()
missionController
.
removeMissionItem
(
index
)
editorMap
.
polygonDraw
.
cancelPolygonEdit
()
missionController
.
removeMissionItem
(
removeIndex
)
if
(
removeIndex
>=
missionController
.
visualItems
.
count
)
{
removeIndex
--
}
setCurrentItem
(
removeIndex
)
}
onInsert
:
{
...
...
@@ -750,17 +697,6 @@ QGCView {
}
}
//-- Dismiss Drop Down (if any)
MouseArea
{
anchors.fill
:
parent
enabled
:
_dropButtonsExclusiveGroup
.
current
!=
null
onClicked
:
{
if
(
_dropButtonsExclusiveGroup
.
current
)
_dropButtonsExclusiveGroup
.
current
.
checked
=
false
_dropButtonsExclusiveGroup
.
current
=
null
}
}
ToolStrip
{
id
:
toolStrip
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
...
...
src/MissionManager/FWLandingPattern.FactMetaData.json
View file @
ecf3d85b
...
...
@@ -5,11 +5,11 @@
"type"
:
"double"
,
"units"
:
"m"
,
"decimalPlaces"
:
1
,
"defaultValue"
:
1
00.0
"defaultValue"
:
3
00.0
},
{
"name"
:
"Landing heading"
,
"shortDescription"
:
"Heading from l
and point to loiter
point."
,
"shortDescription"
:
"Heading from l
oiter point to land
point."
,
"type"
:
"double"
,
"units"
:
"deg"
,
"min"
:
0.0
,
...
...
src/MissionManager/FixedWingLandingComplexItem.cc
View file @
ecf3d85b
...
...
@@ -230,7 +230,7 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void)
QPointF
originPoint
(
east
,
north
);
north
+=
_loiterToLandDistanceFact
.
rawValue
().
toDouble
();
QPointF
loiterPoint
(
east
,
north
);
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
-
_landingHeadingFact
.
rawValue
().
toDouble
());
QPointF
rotatedLoiterPoint
=
_rotatePoint
(
loiterPoint
,
originPoint
,
_landingHeadingFact
.
rawValue
().
toDouble
());
convertNedToGeo
(
rotatedLoiterPoint
.
y
(),
rotatedLoiterPoint
.
x
(),
down
,
tangentOrigin
,
&
_loiterCoordinate
);
...
...
@@ -273,7 +273,7 @@ void FixedWingLandingComplexItem::_recalcFactsFromCoords(void)
// Calc new heading
QPointF
vector
(
eastL
oiter
-
eastLand
,
northLoiter
-
northLand
);
QPointF
vector
(
eastL
and
-
eastLoiter
,
northLand
-
northLoiter
);
double
radians
=
atan2
(
vector
.
y
(),
vector
.
x
());
double
degrees
=
qRadiansToDegrees
(
radians
);
// Change angle to north up = 0 degrees
...
...
src/MissionManager/MissionController.cc
View file @
ecf3d85b
...
...
@@ -258,16 +258,6 @@ void MissionController::removeMissionItem(int index)
item
->
deleteLater
();
_recalcAll
();
// Set the new current item
if
(
index
>=
_visualItems
->
count
())
{
index
--
;
}
for
(
int
i
=
0
;
i
<
_visualItems
->
count
();
i
++
)
{
VisualMissionItem
*
item
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
));
item
->
setIsCurrentItem
(
i
==
index
);
}
_visualItems
->
setDirty
(
true
);
}
...
...
src/MissionManager/SimpleMissionItem.h
View file @
ecf3d85b
...
...
@@ -45,7 +45,7 @@ public:
// Property accesors
QString
category
(
void
)
const
;
MavlinkQmlSingleton
::
Qml_MAV_CMD
command
(
void
)
const
{
return
(
MavlinkQmlSingleton
::
Qml_MAV_CMD
)
_missionItem
.
_commandFact
.
cookedValue
().
toInt
();
}
;
MavlinkQmlSingleton
::
Qml_MAV_CMD
command
(
void
)
const
{
return
(
MavlinkQmlSingleton
::
Qml_MAV_CMD
)
_missionItem
.
_commandFact
.
cookedValue
().
toInt
();
}
bool
friendlyEditAllowed
(
void
)
const
;
bool
homePosition
(
void
)
const
{
return
_homePositionSpecialCase
;
}
bool
rawEdit
(
void
)
const
;
...
...
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