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
008da78c
Commit
008da78c
authored
Mar 23, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow custom build to disable guided actions on no RC
parent
f09fedfc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+16
-14
QGCCorePlugin.h
src/api/QGCCorePlugin.h
+1
-2
QGCOptions.h
src/api/QGCOptions.h
+2
-0
No files found.
src/FlightDisplay/GuidedActionsController.qml
View file @
008da78c
...
...
@@ -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
:
_
activeVehicle
&&
!
_vehicleArmed
property
bool
showDisarm
:
_
activeVehicle
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_
activeVehicle
&&
_vehicleArmed
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_
activeVehicle
&&
_activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showLand
:
_
activeVehicle
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_
activeVehicle
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_
activeVehicle
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
count
-
1
)
property
bool
showPause
:
_
activeVehicle
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
(
_activeVehicle
&&
_vehicleFlying
)
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
!
_hideOrbit
&&
_activeVehicle
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showLandAbort
:
_
activeVehicle
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_
activeVehicle
&&
_vehicleFlying
property
bool
showEmergenyStop
:
_guidedActionsEnabled
&&
!
_hideEmergenyStop
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_
guidedActionsEnabled
&&
!
_vehicleArmed
property
bool
showDisarm
:
_
guidedActionsEnabled
&&
_vehicleArmed
&&
!
_vehicleFlying
property
bool
showRTL
:
_
guidedActionsEnabled
&&
_vehicleArmed
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleFlying
&&
!
_vehicleInRTLMode
property
bool
showTakeoff
:
_
guidedActionsEnabled
&&
_activeVehicle
.
takeoffVehicleSupported
&&
!
_vehicleFlying
property
bool
showLand
:
_
guidedActionsEnabled
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_activeVehicle
.
fixedWing
&&
!
_vehicleInLandMode
property
bool
showStartMission
:
_
guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
!
_vehicleFlying
property
bool
showContinueMission
:
_
guidedActionsEnabled
&&
_missionAvailable
&&
!
_missionActive
&&
_vehicleFlying
&&
(
_currentMissionIndex
<
missionController
.
visualItems
.
count
-
1
)
property
bool
showPause
:
_
guidedActionsEnabled
&&
_vehicleArmed
&&
_activeVehicle
.
pauseVehicleSupported
&&
_vehicleFlying
&&
!
_vehiclePaused
property
bool
showChangeAlt
:
_guidedActionsEnabled
&&
_vehicleFlying
&&
_activeVehicle
.
guidedModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showOrbit
:
_guidedActionsEnabled
&&
!
_hideOrbit
&&
_vehicleFlying
&&
_activeVehicle
.
orbitModeSupported
&&
_vehicleArmed
&&
!
_missionActive
property
bool
showLandAbort
:
_
guidedActionsEnabled
&&
_vehicleFlying
&&
_activeVehicle
.
fixedWing
&&
_vehicleLanding
property
bool
showGotoLocation
:
_
guidedActionsEnabled
&&
_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/api/QGCCorePlugin.h
View file @
008da78c
...
...
@@ -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 @
008da78c
...
...
@@ -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
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