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
0f957bdc
Commit
0f957bdc
authored
11 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: lean angle arming check
parent
a7f03619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArduCopter/motors.pde
+10
-0
10 additions, 0 deletions
ArduCopter/motors.pde
with
10 additions
and
0 deletions
ArduCopter/motors.pde
+
10
−
0
View file @
0f957bdc
...
@@ -471,6 +471,16 @@ static bool arm_checks(bool display_failure)
...
@@ -471,6 +471,16 @@ static bool arm_checks(bool display_failure)
}
}
}
}
// check lean angle
if
((
g
.
arming_check
==
ARMING_CHECK_ALL
)
||
(
g
.
arming_check
&
ARMING_CHECK_INS
))
{
if
(
labs
(
ahrs
.
roll_sensor
)
>
g
.
angle_max
||
labs
(
ahrs
.
pitch_sensor
)
>
g
.
angle_max
)
{
if
(
display_failure
)
{
gcs_send_text_P
(
SEVERITY_HIGH
,
PSTR
(
"Arm: Leaning"
));
}
return
false
;
}
}
// check if safety switch has been pushed
// check if safety switch has been pushed
if
(
hal
.
util
->
safety_switch_state
()
==
AP_HAL
::
Util
::
SAFETY_DISARMED
)
{
if
(
hal
.
util
->
safety_switch_state
()
==
AP_HAL
::
Util
::
SAFETY_DISARMED
)
{
if
(
display_failure
)
{
if
(
display_failure
)
{
...
...
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