Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e156e8a8
Unverified
Commit
e156e8a8
authored
Mar 25, 2018
by
Don Gagne
Committed by
GitHub
Mar 25, 2018
Browse files
Merge pull request #6254 from DonLakeFlyer/DisableGuidedActions
Allow custom build to disable guided actions on no RC
parents
f09fedfc
aab77959
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/FlightDisplay/GuidedActionsController.qml
View file @
e156e8a8
...
...
@@ -93,25 +93,26 @@ Item {
readonly
property
int
actionVtolTransitionToFwdFlight
:
20
readonly
property
int
actionVtolTransitionToMRFlight
:
21
property
bool
showEmergenyStop
:
!
_hideEmergenyStop
&&
_activeVehicle
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_
activeVehic
le
&&
!
_vehicleArmed
property
bool
showDisarm
:
_
activeVehic
le
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_
activeVehic
le
&&
_vehicleArmed
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_
activeVehic
le
&&
_activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showLand
:
_
activeVehic
le
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_
activeVehic
le
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_
activeVehic
le
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
count
-
1
)
property
bool
showPause
:
_
activeVehic
le
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
(
_activeVehic
le
&&
_vehicleFlying
)
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
!
_hideOrbit
&&
_activeVehicle
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showLandAbort
:
_
activeVehic
le
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_
activeVehic
le
&&
_vehicleFlying
property
bool
showEmergenyStop
:
_guidedActionsEnabled
&&
!
_hideEmergenyStop
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_
guidedActionsEnab
le
d
&&
!
_vehicleArmed
property
bool
showDisarm
:
_
guidedActionsEnab
le
d
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_
guidedActionsEnab
le
d
&&
_vehicleArmed
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_
guidedActionsEnab
le
d
&&
_activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showLand
:
_
guidedActionsEnab
le
d
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_
guidedActionsEnab
le
d
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_
guidedActionsEnab
le
d
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
count
-
1
)
property
bool
showPause
:
_
guidedActionsEnab
le
d
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
_guidedActionsEnab
le
d
&&
_vehicleFlying
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
_guidedActionsEnabled
&&
!
_hideOrbit
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showLandAbort
:
_
guidedActionsEnab
le
d
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_
guidedActionsEnab
le
d
&&
_vehicleFlying
// Note: The 'missionController.visualItems.count - 3' is a hack to not trigger resume mission when a mission ends with an RTL item
property
bool
showResumeMission
:
_activeVehicle
&&
!
_vehicleArmed
&&
_vehicleWasFlying
&&
_missionAvailable
&&
_resumeMissionIndex
>
0
&&
(
_resumeMissionIndex
<
missionController
.
visualItems
.
count
-
3
)
property
bool
guidedUIVisible
:
guidedActionConfirm
.
visible
||
guidedActionList
.
visible
property
bool
_guidedActionsEnabled
:
(
QGroundControl
.
corePlugin
.
options
.
guidedActionsRequireRCRSSI
&&
_activeVehicle
)
?
_rcRSSIAvailable
:
_activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
string
_flightMode
:
_activeVehicle
?
_activeVehicle
.
flightMode
:
""
property
bool
_missionAvailable
:
missionController
.
containsItems
...
...
@@ -128,6 +129,7 @@ Item {
property
bool
_hideEmergenyStop
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowEmergencyStop
property
bool
_hideOrbit
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowOrbit
property
bool
_vehicleWasFlying
:
false
property
bool
_rcRSSIAvailable
:
_activeVehicle
?
_activeVehicle
.
rcRSSI
>
0
&&
_activeVehicle
.
rcRSSI
<
255
:
false
/*
//Handy code for debugging state problems
...
...
@@ -193,7 +195,7 @@ Item {
_actionData
=
actionData
switch
(
actionCode
)
{
case
actionArm
:
if
(
_vehicleFlying
)
{
if
(
_vehicleFlying
||
!
_guidedActionsEnabled
)
{
return
}
confirmDialog
.
title
=
armTitle
...
...
src/PlanView/GeoFenceMapVisuals.qml
View file @
e156e8a8
...
...
@@ -84,7 +84,7 @@ Item {
Component.onDestruction
:
{
_breachReturnPointComponent
.
destroy
()
_paramCircleFenceComponent
.
dest
o
ry
()
_paramCircleFenceComponent
.
destr
o
y
()
_mouseAreaComponent
.
destroy
()
}
...
...
src/api/QGCCorePlugin.h
View file @
e156e8a8
...
...
@@ -21,8 +21,6 @@
/// @brief Core Plugin Interface for QGroundControl
/// @author Gus Grubba <mavlink@grubba.com>
// Work In Progress
class
QGCApplication
;
class
QGCOptions
;
class
QGCSettings
;
...
...
@@ -33,6 +31,7 @@ class QQmlApplicationEngine;
class
Vehicle
;
class
LinkInterface
;
class
QmlObjectListModel
;
class
QGCCorePlugin
:
public
QGCTool
{
Q_OBJECT
...
...
src/api/QGCOptions.h
View file @
e156e8a8
...
...
@@ -46,6 +46,7 @@ public:
Q_PROPERTY
(
bool
showOfflineMapImport
READ
showOfflineMapImport
NOTIFY
showOfflineMapImportChanged
)
Q_PROPERTY
(
bool
useMobileFileDialog
READ
useMobileFileDialog
CONSTANT
)
Q_PROPERTY
(
bool
showMissionStatus
READ
showMissionStatus
CONSTANT
)
Q_PROPERTY
(
bool
guidedActionsRequireRCRSSI
READ
guidedActionsRequireRCRSSI
CONSTANT
)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
...
...
@@ -82,6 +83,7 @@ public:
virtual
bool
guidedBarShowOrbit
()
const
{
return
true
;
}
virtual
bool
missionWaypointsOnly
()
const
{
return
false
;
}
///< true: Only allow waypoints and complex items in Plan
virtual
bool
multiVehicleEnabled
()
const
{
return
true
;
}
///< false: multi vehicle support is disabled
virtual
bool
guidedActionsRequireRCRSSI
()
const
{
return
false
;
}
///< true: Guided actions will be disabled is there is no RC RSSI
#if defined(__mobile__)
virtual
bool
showOfflineMapExport
()
const
{
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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