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
50acd9a9
Commit
50acd9a9
authored
Aug 15, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
fc7ee56d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
2 deletions
+41
-2
ChangeLog.md
ChangeLog.md
+1
-0
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+17
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+9
-0
Vehicle.h
src/Vehicle/Vehicle.h
+1
-0
MainRootWindow.qml
src/ui/MainRootWindow.qml
+1
-0
MainStatusIndicator.qml
src/ui/toolbar/MainStatusIndicator.qml
+12
-2
No files found.
ChangeLog.md
View file @
50acd9a9
...
...
@@ -4,6 +4,7 @@ Note: This file only contains high level features or important fixes.
## 4.1 - Daily build
*
Fly: Press and hold on arm button will change it to Force Arm. Click again to force arm.
*
VTOL: General setting for transition distance which affects Plan takeoff, landing pattern creation
*
VTOL: Much better VTOL support throughout QGC
*
Maps: Support zoom up to level 23 even if map provider doesn't provide tiles that high
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
50acd9a9
...
...
@@ -35,6 +35,7 @@ Item {
readonly
property
string
emergencyStopTitle
:
qsTr
(
"
EMERGENCY STOP
"
)
readonly
property
string
armTitle
:
qsTr
(
"
Arm
"
)
readonly
property
string
forceArmTitle
:
qsTr
(
"
Force Arm
"
)
readonly
property
string
disarmTitle
:
qsTr
(
"
Disarm
"
)
readonly
property
string
rtlTitle
:
qsTr
(
"
Return
"
)
readonly
property
string
takeoffTitle
:
qsTr
(
"
Takeoff
"
)
...
...
@@ -55,6 +56,7 @@ Item {
readonly
property
string
actionListTitle
:
qsTr
(
"
Action
"
)
readonly
property
string
armMessage
:
qsTr
(
"
Arm the vehicle.
"
)
readonly
property
string
forceArmMessage
:
qsTr
(
"
WARNING: This will force arming of the vehicle bypassing any safety checks.
"
)
readonly
property
string
disarmMessage
:
qsTr
(
"
Disarm the vehicle
"
)
readonly
property
string
emergencyStopMessage
:
qsTr
(
"
WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.
"
)
readonly
property
string
takeoffMessage
:
qsTr
(
"
Takeoff from ground and hold position.
"
)
...
...
@@ -97,6 +99,7 @@ Item {
readonly
property
int
actionVtolTransitionToMRFlight
:
21
readonly
property
int
actionROI
:
22
readonly
property
int
actionActionList
:
23
readonly
property
int
actionForceArm
:
24
property
bool
_useChecklist
:
QGroundControl
.
settingsManager
.
appSettings
.
useChecklist
.
rawValue
&&
QGroundControl
.
corePlugin
.
options
.
preFlightChecklistUrl
.
toString
().
length
property
bool
_enforceChecklist
:
_useChecklist
&&
QGroundControl
.
settingsManager
.
appSettings
.
enforceChecklist
.
rawValue
...
...
@@ -104,6 +107,7 @@ Item {
property
bool
showEmergenyStop
:
_guidedActionsEnabled
&&
!
_hideEmergenyStop
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_guidedActionsEnabled
&&
!
_vehicleArmed
&&
_canArm
property
bool
showForceArm
:
_guidedActionsEnabled
&&
!
_vehicleArmed
property
bool
showDisarm
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_guidedActionsEnabled
&&
_vehicleArmed
&&
activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_guidedActionsEnabled
&&
activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
&&
_canArm
...
...
@@ -274,6 +278,7 @@ Item {
Connections
{
target
:
mainWindow
onArmVehicleRequest
:
armVehicleRequest
()
onForceArmVehicleRequest
:
forceArmVehicleRequest
()
onDisarmVehicleRequest
:
disarmVehicleRequest
()
onVtolTransitionToFwdFlightRequest
:
vtolTransitionToFwdFlightRequest
()
onVtolTransitionToMRFlightRequest
:
vtolTransitionToMRFlightRequest
()
...
...
@@ -283,6 +288,10 @@ Item {
confirmAction
(
actionArm
)
}
function
forceArmVehicleRequest
()
{
confirmAction
(
actionForceArm
)
}
function
disarmVehicleRequest
()
{
if
(
showEmergenyStop
)
{
confirmAction
(
actionEmergencyStop
)
...
...
@@ -325,6 +334,11 @@ Item {
confirmDialog
.
message
=
armMessage
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showArm
})
break
;
case
actionForceArm
:
confirmDialog
.
title
=
forceArmTitle
confirmDialog
.
message
=
forceArmMessage
confirmDialog
.
hideTrigger
=
Qt
.
binding
(
function
()
{
return
!
showForceArm
})
break
;
case
actionDisarm
:
if
(
_vehicleFlying
)
{
return
...
...
@@ -480,6 +494,9 @@ Item {
case
actionArm
:
activeVehicle
.
armed
=
true
break
case
actionForceArm
:
activeVehicle
.
forceArm
()
break
case
actionDisarm
:
activeVehicle
.
armed
=
false
break
...
...
src/Vehicle/Vehicle.cc
View file @
50acd9a9
...
...
@@ -2397,6 +2397,15 @@ void Vehicle::setArmed(bool armed)
armed
?
1.0
f
:
0.0
f
);
}
void
Vehicle
::
forceArm
(
void
)
{
sendMavCommand
(
_defaultComponentId
,
MAV_CMD_COMPONENT_ARM_DISARM
,
true
,
// show error if fails
1.0
f
,
// arm
2989
);
// force arm
}
bool
Vehicle
::
flightModeSetAvailable
()
{
return
_firmwarePlugin
->
isCapable
(
this
,
FirmwarePlugin
::
SetFlightModeCapability
);
...
...
src/Vehicle/Vehicle.h
View file @
50acd9a9
...
...
@@ -791,6 +791,7 @@ public:
Q_INVOKABLE
void
gimbalPitchStep
(
int
direction
);
Q_INVOKABLE
void
gimbalYawStep
(
int
direction
);
Q_INVOKABLE
void
centerGimbal
();
Q_INVOKABLE
void
forceArm
();
/// Sends PARAM_MAP_RC message to vehicle
Q_INVOKABLE
void
sendParamMapRC
(
const
QString
&
paramName
,
double
scale
,
double
centerValue
,
int
tuningID
,
double
minValue
,
double
maxValue
);
...
...
src/ui/MainRootWindow.qml
View file @
50acd9a9
...
...
@@ -96,6 +96,7 @@ ApplicationWindow {
//-- Actions
signal
armVehicleRequest
signal
forceArmVehicleRequest
signal
disarmVehicleRequest
signal
vtolTransitionToFwdFlightRequest
signal
vtolTransitionToMRFlightRequest
...
...
src/ui/toolbar/MainStatusIndicator.qml
View file @
50acd9a9
...
...
@@ -190,13 +190,23 @@ RowLayout {
QGCButton
{
Layout.alignment
:
Qt
.
AlignHCenter
text
:
_armed
?
qsTr
(
"
Disarm
"
)
:
qsTr
(
"
Arm
"
)
text
:
_armed
?
qsTr
(
"
Disarm
"
)
:
(
forceArm
?
qsTr
(
"
Force Arm
"
)
:
qsTr
(
"
Arm
"
))
property
bool
forceArm
:
false
onPressAndHold
:
forceArm
=
true
onClicked
:
{
if
(
_armed
)
{
mainWindow
.
disarmVehicleRequest
()
}
else
{
mainWindow
.
armVehicleRequest
()
if
(
forceArm
)
{
mainWindow
.
forceArmVehicleRequest
()
}
else
{
mainWindow
.
armVehicleRequest
()
}
}
forceArm
=
false
mainWindow
.
hideIndicatorPopup
()
}
}
...
...
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