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
929d4a02
Commit
929d4a02
authored
Feb 18, 2017
by
Don Gagne
Committed by
GitHub
Feb 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4546 from dkschrad/master
Addition of "Abort" button
parents
7045df93
f16514fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+14
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+8
-0
Vehicle.h
src/Vehicle/Vehicle.h
+3
-0
No files found.
src/FlightDisplay/FlightDisplayViewWidgets.qml
View file @
929d4a02
...
...
@@ -218,6 +218,7 @@ Item {
readonly
property
int
confirmGoTo
:
8
readonly
property
int
confirmRetask
:
9
readonly
property
int
confirmOrbit
:
10
readonly
property
int
confirmAbort
:
11
property
int
confirmActionCode
property
real
_showMargin
:
_margins
...
...
@@ -265,6 +266,9 @@ Item {
//-- Center on current flight map position and orbit with a 50m radius (velocity/direction controlled by the RC)
//_activeVehicle.guidedModeOrbit(QGroundControl.flightMapPosition, 50.0)
break
;
case
confirmAbort
:
_activeVehicle
.
abortLanding
(
50
)
// hardcoded value for climbOutAltitude that is currently ignored
break
;
default
:
console
.
warn
(
qsTr
(
"
Internal error: unknown confirmActionCode
"
),
confirmActionCode
)
}
...
...
@@ -316,6 +320,9 @@ Item {
case
confirmOrbit
:
guidedModeConfirm
.
confirmText
=
qsTr
(
"
enter orbit mode
"
)
break
;
case
confirmAbort
:
guidedModeConfirm
.
confirmText
=
qsTr
(
"
abort landing
"
)
break
;
}
_guidedModeBar
.
visible
=
false
guidedModeConfirm
.
visible
=
true
...
...
@@ -383,6 +390,13 @@ Item {
onClicked
:
_guidedModeBar
.
confirmAction
(
_guidedModeBar
.
confirmOrbit
)
}
QGCButton
{
pointSize
:
_guidedModeBar
.
_fontPointSize
text
:
qsTr
(
"
Abort
"
)
visible
:
_activeVehicle
&&
_activeVehicle
.
flying
&&
_activeVehicle
.
fixedWing
onClicked
:
_guidedModeBar
.
confirmAction
(
_guidedModeBar
.
confirmAbort
)
}
}
// Row
}
// Column
}
// Rectangle - Guided mode buttons
...
...
src/Vehicle/Vehicle.cc
View file @
929d4a02
...
...
@@ -1897,6 +1897,14 @@ void Vehicle::pauseVehicle(void)
_firmwarePlugin
->
pauseVehicle
(
this
);
}
void
Vehicle
::
abortLanding
(
double
climbOutAltitude
)
{
sendMavCommand
(
defaultComponentId
(),
MAV_CMD_DO_GO_AROUND
,
true
,
// show error if fails
climbOutAltitude
);
}
bool
Vehicle
::
guidedMode
(
void
)
const
{
return
_firmwarePlugin
->
isGuidedMode
(
this
);
...
...
src/Vehicle/Vehicle.h
View file @
929d4a02
...
...
@@ -364,6 +364,9 @@ public:
/// Command vehicle to kill all motors no matter what state
Q_INVOKABLE
void
emergencyStop
(
void
);
/// Command vehicle to abort landing
Q_INVOKABLE
void
abortLanding
(
double
climbOutAltitude
);
/// Alter the current mission item on the vehicle
Q_INVOKABLE
void
setCurrentMissionSequence
(
int
seq
);
...
...
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