Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
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
Baitboat
Commits
5f3c2bcd
Commit
5f3c2bcd
authored
10 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: rename landing_gear.pde
parent
62b5f326
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/landing_gear.pde
+7
-8
7 additions, 8 deletions
ArduCopter/landing_gear.pde
with
7 additions
and
8 deletions
ArduCopter/
L
anding
G
ear.pde
→
ArduCopter/
l
anding
_g
ear.pde
+
7
−
8
View file @
5f3c2bcd
...
@@ -2,31 +2,30 @@
...
@@ -2,31 +2,30 @@
// Run landing gear controller at 10Hz
// Run landing gear controller at 10Hz
static
void
landinggear_update
(){
static
void
landinggear_update
(){
// If landing gear control is active, run update function.
// If landing gear control is active, run update function.
if
(
g
.
ch7_option
==
AUX_SWITCH_LANDING_GEAR
||
g
.
ch8_option
==
AUX_SWITCH_LANDING_GEAR
){
if
(
g
.
ch7_option
==
AUX_SWITCH_LANDING_GEAR
||
g
.
ch8_option
==
AUX_SWITCH_LANDING_GEAR
){
// last status (deployed or retracted) used to check for changes
// last status (deployed or retracted) used to check for changes
static
bool
last_deploy_status
;
static
bool
last_deploy_status
;
// if we are doing an automatic landing procedure, force the landing gear to deploy.
// if we are doing an automatic landing procedure, force the landing gear to deploy.
// To-Do: should we pause the auto-land procedure to give time for gear to come down?
// To-Do: should we pause the auto-land procedure to give time for gear to come down?
if
(
control_mode
==
LAND
||
(
control_mode
==
RTL
&&
rtl_state
==
Land
)
||
(
control_mode
==
AUTO
&&
auto_mode
==
Auto_Land
)){
if
(
control_mode
==
LAND
||
(
control_mode
==
RTL
&&
rtl_state
==
Land
)
||
(
control_mode
==
AUTO
&&
auto_mode
==
Auto_Land
)){
landinggear
.
force_deploy
(
true
);
landinggear
.
force_deploy
(
true
);
}
}
landinggear
.
update
();
landinggear
.
update
();
// send event message to datalog if status has changed
// send event message to datalog if status has changed
if
(
landinggear
.
deployed
()
!=
last_deploy_status
){
if
(
landinggear
.
deployed
()
!=
last_deploy_status
){
if
(
landinggear
.
deployed
()){
if
(
landinggear
.
deployed
())
{
Log_Write_Event
(
DATA_LANDING_GEAR_DEPLOYED
);
Log_Write_Event
(
DATA_LANDING_GEAR_DEPLOYED
);
}
else
{
}
else
{
Log_Write_Event
(
DATA_LANDING_GEAR_RETRACTED
);
Log_Write_Event
(
DATA_LANDING_GEAR_RETRACTED
);
}
}
}
}
last_deploy_status
=
landinggear
.
deployed
();
last_deploy_status
=
landinggear
.
deployed
();
}
}
}
}
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