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
3b83aacf
Commit
3b83aacf
authored
Oct 06, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect FirmwarePlugin::flightModeSetAvailable
parent
3e850d32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+1
-1
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+14
-12
No files found.
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
3b83aacf
...
...
@@ -191,5 +191,5 @@ void PX4FirmwarePlugin::adjustMavlinkMessage(mavlink_message_t* message)
bool
PX4FirmwarePlugin
::
isCapable
(
FirmwareCapabilities
capabilities
)
{
return
capabilities
&&
(
MavCmdPreflightStorageCapability
|
SetFlightModeCapability
)
;
return
(
capabilities
&
(
MavCmdPreflightStorageCapability
|
SetFlightModeCapability
))
==
capabilities
;
}
src/ui/toolbar/MainToolBar.qml
View file @
3b83aacf
...
...
@@ -542,7 +542,7 @@ Rectangle {
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
activeVehicle
.
flightMode
menu
:
flightModesMenu
menu
:
activeVehicle
.
flightModeSetAvailable
?
flightModesMenu
:
null
Menu
{
id
:
flightModesMenu
...
...
@@ -561,17 +561,19 @@ Rectangle {
property
var
flightModesMenuItems
:
[]
function
updateFlightModesMenu
()
{
// Remove old menu items
for
(
var
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
flightModesMenu
.
removeItem
(
flightModesMenuItems
[
i
])
}
flightModesMenuItems
.
length
=
0
// Add new items
for
(
var
i
=
0
;
i
<
activeVehicle
.
flightModes
.
length
;
i
++
)
{
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
activeVehicle
.
flightModes
[
i
]
})
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
if
(
activeVehicle
.
flightModeSetAvailable
)
{
// Remove old menu items
for
(
var
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
flightModesMenu
.
removeItem
(
flightModesMenuItems
[
i
])
}
flightModesMenuItems
.
length
=
0
// Add new items
for
(
var
i
=
0
;
i
<
activeVehicle
.
flightModes
.
length
;
i
++
)
{
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
activeVehicle
.
flightModes
[
i
]
})
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
}
}
}
...
...
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