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
0f76d2a6
Commit
0f76d2a6
authored
May 22, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PX4 flight modes: Cleanup acro, introduce stabilize
parent
bdbb3c45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+17
-0
No files found.
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
0f76d2a6
...
...
@@ -40,6 +40,7 @@ enum PX4_CUSTOM_MAIN_MODE {
PX4_CUSTOM_MAIN_MODE_AUTO
,
PX4_CUSTOM_MAIN_MODE_ACRO
,
PX4_CUSTOM_MAIN_MODE_OFFBOARD
,
PX4_CUSTOM_MAIN_MODE_STABILIZED
,
};
enum
PX4_CUSTOM_SUB_MODE_AUTO
{
...
...
@@ -100,6 +101,18 @@ QList<AutoPilotPluginManager::FullMode_t> PX4AutoPilotPlugin::getModes(void)
fullMode
.
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
;
fullMode
.
customMode
=
px4_cm
.
data
;
modeList
<<
fullMode
;
px4_cm
.
data
=
0
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_ACRO
;
fullMode
.
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
;
fullMode
.
customMode
=
px4_cm
.
data
;
modeList
<<
fullMode
;
px4_cm
.
data
=
0
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_STABILIZED
;
fullMode
.
baseMode
=
MAV_MODE_FLAG_CUSTOM_MODE_ENABLED
|
MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
|
MAV_MODE_FLAG_STABILIZE_ENABLED
;
fullMode
.
customMode
=
px4_cm
.
data
;
modeList
<<
fullMode
;
px4_cm
.
data
=
0
;
px4_cm
.
main_mode
=
PX4_CUSTOM_MAIN_MODE_ALTCTL
;
...
...
@@ -140,6 +153,10 @@ QString PX4AutoPilotPlugin::getShortModeText(uint8_t baseMode, uint32_t customMo
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_MANUAL
)
{
mode
=
"|MANUAL"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_ACRO
)
{
mode
=
"|ACRO"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_STABILIZED
)
{
mode
=
"|STAB"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_ALTCTL
)
{
mode
=
"|ALTCTL"
;
}
else
if
(
px4_mode
.
main_mode
==
PX4_CUSTOM_MAIN_MODE_POSCTL
)
{
...
...
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