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
b7ea870f
Commit
b7ea870f
authored
Mar 10, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement click-to-retask via MISSION_SET_CURRENT in flight view for #2275
parent
36561731
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
2 deletions
+20
-2
MissionItemView.qml
src/FlightMap/MapItems/MissionItemView.qml
+1
-2
VisualMissionItem.cc
src/MissionManager/VisualMissionItem.cc
+5
-0
VisualMissionItem.h
src/MissionManager/VisualMissionItem.h
+2
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+10
-0
Vehicle.h
src/Vehicle/Vehicle.h
+2
-0
No files found.
src/FlightMap/MapItems/MissionItemView.qml
View file @
b7ea870f
...
...
@@ -42,6 +42,7 @@ MapItemView {
z
:
QGroundControl
.
zOrderMapItems
missionItem
:
object
sequenceNumber
:
object
.
sequenceNumber
onClicked
:
object
.
tryMakingCurrent
()
// These are the non-coordinate child mission items attached to this item
Row
{
...
...
@@ -55,8 +56,6 @@ MapItemView {
label
:
object
.
sequenceNumber
isCurrentItem
:
object
.
isCurrentItem
z
:
2
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
}
}
}
...
...
src/MissionManager/VisualMissionItem.cc
View file @
b7ea870f
...
...
@@ -103,3 +103,8 @@ void VisualMissionItem::setAzimuth(double azimuth)
_azimuth
=
azimuth
;
emit
azimuthChanged
(
_azimuth
);
}
void
VisualMissionItem
::
tryMakingCurrent
()
{
_vehicle
->
setCurrentMissionSequence
(
sequenceNumber
());
}
src/MissionManager/VisualMissionItem.h
View file @
b7ea870f
...
...
@@ -92,6 +92,8 @@ public:
/// are shown next to the exitCoordinate indidcator in the ui.
Q_PROPERTY
(
QmlObjectListModel
*
childItems
READ
childItems
CONSTANT
)
Q_INVOKABLE
void
tryMakingCurrent
();
// Property accesors
double
altDifference
(
void
)
const
{
return
_altDifference
;
}
...
...
src/Vehicle/Vehicle.cc
View file @
b7ea870f
...
...
@@ -1136,6 +1136,16 @@ void Vehicle::setFlightMode(const QString& flightMode)
}
}
void
Vehicle
::
setCurrentMissionSequence
(
int
seq
)
{
if
(
!
_firmwarePlugin
->
sendHomePositionToVehicle
())
{
seq
--
;
}
mavlink_message_t
msg
;
mavlink_msg_mission_set_current_pack
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
id
(),
_compID
,
seq
);
sendMessage
(
msg
);
}
bool
Vehicle
::
hilMode
(
void
)
{
return
_base_mode
&
MAV_MODE_FLAG_HIL_ENABLED
;
...
...
src/Vehicle/Vehicle.h
View file @
b7ea870f
...
...
@@ -430,6 +430,8 @@ public:
QString
flightMode
(
void
)
const
;
void
setFlightMode
(
const
QString
&
flightMode
);
void
setCurrentMissionSequence
(
int
seq
);
bool
hilMode
(
void
);
void
setHilMode
(
bool
hilMode
);
...
...
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