Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Ardupilot
Commits
9c40c11e
Commit
9c40c11e
authored
12 years ago
by
Jason Short
Browse files
Options
Downloads
Patches
Plain Diff
ACM: Formatting
parent
4eeaf4c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArduCopter/system.pde
+16
-16
16 additions, 16 deletions
ArduCopter/system.pde
with
16 additions
and
16 deletions
ArduCopter/system.pde
+
16
−
16
View file @
9c40c11e
...
...
@@ -441,25 +441,25 @@ static void set_mode(byte mode)
switch
(
control_mode
)
{
case
ACRO
:
yaw_mode
=
YAW_ACRO
;
yaw_mode
=
YAW_ACRO
;
roll_pitch_mode
=
ROLL_PITCH_ACRO
;
throttle_mode
=
THROTTLE_MANUAL
;
// reset acro axis targets to current attitude
if
(
g
.
axis_enabled
)
{
roll_axis
=
ahrs
.
roll_sensor
;
pitch_axis
=
ahrs
.
pitch_sensor
;
nav_yaw
=
ahrs
.
yaw_sensor
;
roll_axis
=
ahrs
.
roll_sensor
;
pitch_axis
=
ahrs
.
pitch_sensor
;
nav_yaw
=
ahrs
.
yaw_sensor
;
}
break
;
case
STABILIZE
:
yaw_mode
=
YAW_HOLD
;
yaw_mode
=
YAW_HOLD
;
roll_pitch_mode
=
ROLL_PITCH_STABLE
;
throttle_mode
=
THROTTLE_MANUAL
;
break
;
case
ALT_HOLD
:
yaw_mode
=
ALT_HOLD_YAW
;
yaw_mode
=
ALT_HOLD_YAW
;
roll_pitch_mode
=
ALT_HOLD_RP
;
throttle_mode
=
ALT_HOLD_THR
;
...
...
@@ -467,7 +467,7 @@ static void set_mode(byte mode)
break
;
case
AUTO
:
yaw_mode
=
AUTO_YAW
;
yaw_mode
=
AUTO_YAW
;
roll_pitch_mode
=
AUTO_RP
;
throttle_mode
=
AUTO_THR
;
...
...
@@ -476,45 +476,45 @@ static void set_mode(byte mode)
break
;
case
CIRCLE
:
yaw_mode
=
CIRCLE_YAW
;
yaw_mode
=
CIRCLE_YAW
;
roll_pitch_mode
=
CIRCLE_RP
;
throttle_mode
=
CIRCLE_THR
;
set_next_WP
(
&
current_loc
);
circle_WP
=
next_WP
;
circle_WP
=
next_WP
;
circle_angle
=
0
;
break
;
case
LOITER
:
yaw_mode
=
LOITER_YAW
;
yaw_mode
=
LOITER_YAW
;
roll_pitch_mode
=
LOITER_RP
;
throttle_mode
=
LOITER_THR
;
set_next_WP
(
&
current_loc
);
break
;
case
POSITION
:
yaw_mode
=
YAW_HOLD
;
yaw_mode
=
YAW_HOLD
;
roll_pitch_mode
=
ROLL_PITCH_AUTO
;
throttle_mode
=
THROTTLE_MANUAL
;
set_next_WP
(
&
current_loc
);
break
;
case
GUIDED
:
yaw_mode
=
YAW_AUTO
;
yaw_mode
=
YAW_AUTO
;
roll_pitch_mode
=
ROLL_PITCH_AUTO
;
throttle_mode
=
THROTTLE_AUTO
;
next_WP
=
current_loc
;
next_WP
=
current_loc
;
set_next_WP
(
&
guided_WP
);
break
;
case
LAND
:
yaw_mode
=
LOITER_YAW
;
yaw_mode
=
LOITER_YAW
;
roll_pitch_mode
=
LOITER_RP
;
throttle_mode
=
THROTTLE_AUTO
;
do_land
();
break
;
case
RTL
:
yaw_mode
=
RTL_YAW
;
yaw_mode
=
RTL_YAW
;
roll_pitch_mode
=
RTL_RP
;
throttle_mode
=
RTL_THR
;
rtl_reached_alt
=
false
;
...
...
@@ -523,7 +523,7 @@ static void set_mode(byte mode)
break
;
case
OF_LOITER
:
yaw_mode
=
OF_LOITER_YAW
;
yaw_mode
=
OF_LOITER_YAW
;
roll_pitch_mode
=
OF_LOITER_RP
;
throttle_mode
=
OF_LOITER_THR
;
set_next_WP
(
&
current_loc
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment