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
e0caee43
Commit
e0caee43
authored
Mar 14, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Confirm retasking command before altering active waypoint
parent
b7ea870f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
19 deletions
+26
-19
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+1
-0
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+7
-0
MissionItemView.qml
src/FlightMap/MapItems/MissionItemView.qml
+4
-1
VisualMissionItem.cc
src/MissionManager/VisualMissionItem.cc
+0
-5
VisualMissionItem.h
src/MissionManager/VisualMissionItem.h
+0
-2
Vehicle.cc
src/Vehicle/Vehicle.cc
+11
-10
Vehicle.h
src/Vehicle/Vehicle.h
+3
-1
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
e0caee43
...
...
@@ -48,6 +48,7 @@ FlightMap {
property
bool
_activeVehicleCoordinateValid
:
_activeVehicle
?
_activeVehicle
.
coordinateValid
:
false
property
var
activeVehicleCoordinate
:
_activeVehicle
?
_activeVehicle
.
coordinate
:
QtPositioning
.
coordinate
()
property
var
_gotoHereCoordinate
:
QtPositioning
.
coordinate
()
property
int
_retaskSequence
:
0
Component.onCompleted
:
{
QGroundControl
.
flightMapPosition
=
center
...
...
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
e0caee43
...
...
@@ -286,6 +286,7 @@ Item {
readonly
property
int
confirmEmergencyStop
:
6
readonly
property
int
confirmChangeAlt
:
7
readonly
property
int
confirmGoTo
:
8
readonly
property
int
confirmRetask
:
9
property
int
confirmActionCode
property
string
confirmText
...
...
@@ -322,6 +323,9 @@ Item {
case
confirmGoTo
:
_activeVehicle
.
guidedModeGotoLocation
(
_flightMap
.
_gotoHereCoordinate
)
break
;
case
confirmRetask
:
_activeVehicle
.
setCurrentMissionSequence
(
_flightMap
.
_retaskSequence
)
break
;
default
:
console
.
warn
(
"
Internal error: unknown confirmActionCode
"
,
confirmActionCode
)
}
...
...
@@ -355,6 +359,9 @@ Item {
case
confirmGoTo
:
_guidedModeBar
.
confirmText
=
"
move
"
break
;
case
confirmRetask
:
_guidedModeBar
.
confirmText
=
"
active waypoint change
"
break
;
}
guidedModeButtons
.
visible
=
false
guidedModeConfirm
.
visible
=
true
...
...
src/FlightMap/MapItems/MissionItemView.qml
View file @
e0caee43
...
...
@@ -42,7 +42,10 @@ MapItemView {
z
:
QGroundControl
.
zOrderMapItems
missionItem
:
object
sequenceNumber
:
object
.
sequenceNumber
onClicked
:
object
.
tryMakingCurrent
()
onClicked
:
{
parent
.
_retaskSequence
=
object
.
sequenceNumber
parent
.
flightWidgets
.
guidedModeBar
.
confirmAction
(
parent
.
flightWidgets
.
guidedModeBar
.
confirmRetask
)
}
// These are the non-coordinate child mission items attached to this item
Row
{
...
...
src/MissionManager/VisualMissionItem.cc
View file @
e0caee43
...
...
@@ -103,8 +103,3 @@ void VisualMissionItem::setAzimuth(double azimuth)
_azimuth
=
azimuth
;
emit
azimuthChanged
(
_azimuth
);
}
void
VisualMissionItem
::
tryMakingCurrent
()
{
_vehicle
->
setCurrentMissionSequence
(
sequenceNumber
());
}
src/MissionManager/VisualMissionItem.h
View file @
e0caee43
...
...
@@ -92,8 +92,6 @@ 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 @
e0caee43
...
...
@@ -1136,16 +1136,6 @@ 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
;
...
...
@@ -1500,6 +1490,16 @@ void Vehicle::emergencyStop(void)
sendMessage
(
msg
);
}
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
);
}
void
Vehicle
::
doCommandLong
(
int
component
,
MAV_CMD
command
,
float
param1
,
float
param2
,
float
param3
,
float
param4
,
float
param5
,
float
param6
,
float
param7
)
{
mavlink_message_t
msg
;
...
...
@@ -1521,6 +1521,7 @@ void Vehicle::doCommandLong(int component, MAV_CMD command, float param1, float
sendMessage
(
msg
);
}
const
char
*
VehicleGPSFactGroup
::
_hdopFactName
=
"hdop"
;
const
char
*
VehicleGPSFactGroup
::
_vdopFactName
=
"vdop"
;
const
char
*
VehicleGPSFactGroup
::
_courseOverGroundFactName
=
"courseOverGround"
;
...
...
src/Vehicle/Vehicle.h
View file @
e0caee43
...
...
@@ -356,6 +356,9 @@ public:
/// Command vehicle to kill all motors no matter what state
Q_INVOKABLE
void
emergencyStop
(
void
);
/// Alter the current mission item on the vehicle
Q_INVOKABLE
void
setCurrentMissionSequence
(
int
seq
);
bool
guidedModeSupported
(
void
)
const
;
bool
pauseVehicleSupported
(
void
)
const
;
...
...
@@ -430,7 +433,6 @@ 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