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
340f3a7f
Commit
340f3a7f
authored
11 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Copter: ch7/ch8 parachute release
parent
ac982656
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ArduCopter/control_modes.pde
+32
-1
32 additions, 1 deletion
ArduCopter/control_modes.pde
ArduCopter/defines.h
+3
-0
3 additions, 0 deletions
ArduCopter/defines.h
with
35 additions
and
1 deletion
ArduCopter/control_modes.pde
+
32
−
1
View file @
340f3a7f
...
...
@@ -110,6 +110,8 @@ static void init_aux_switches()
case
AUX_SWITCH_EPM
:
case
AUX_SWITCH_SPRAYER
:
case
AUX_SWITCH_EKF
:
case
AUX_SWITCH_PARACHUTE_ENABLE
:
case
AUX_SWITCH_PARACHUTE_3POS
:
// we trust the vehicle will be disarmed so even if switch is in release position the chute will not release
do_aux_switch_function
(
g
.
ch7_option
,
ap
.
CH7_flag
);
break
;
}
...
...
@@ -124,6 +126,8 @@ static void init_aux_switches()
case
AUX_SWITCH_EPM
:
case
AUX_SWITCH_SPRAYER
:
case
AUX_SWITCH_EKF
:
case
AUX_SWITCH_PARACHUTE_ENABLE
:
case
AUX_SWITCH_PARACHUTE_3POS
:
// we trust the vehicle will be disarmed so even if switch is in release position the chute will not release
do_aux_switch_function
(
g
.
ch8_option
,
ap
.
CH8_flag
);
break
;
}
...
...
@@ -365,7 +369,34 @@ static void do_aux_switch_function(int8_t ch_function, uint8_t ch_flag)
ahrs
.
set_ekf_use
(
ch_flag
==
AUX_SWITCH_HIGH
);
break
;
#endif
#if PARACHUTE == ENABLED
case
AUX_SWITCH_PARACHUTE_ENABLE
:
// Parachute enable/disable
parachute
.
enabled
(
ch_flag
==
AUX_SWITCH_HIGH
);
break
;
case
AUX_SWITCH_PARACHUTE_RELEASE
:
if
(
ch_flag
==
AUX_SWITCH_HIGH
)
{
parachute_release
();
}
break
;
case
AUX_SWITCH_PARACHUTE_3POS
:
// Parachute disable, enable, release with 3 position switch
switch
(
ch_flag
)
{
case
AUX_SWITCH_LOW
:
parachute
.
enabled
(
false
);
break
;
case
AUX_SWITCH_MIDDLE
:
parachute
.
enabled
(
true
);
break
;
case
AUX_SWITCH_HIGH
:
parachute
.
enabled
(
true
);
parachute_release
();
break
;
}
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
ArduCopter/defines.h
+
3
−
0
View file @
340f3a7f
...
...
@@ -53,6 +53,9 @@
#define AUX_SWITCH_LAND 18 // change to LAND flight mode
#define AUX_SWITCH_EPM 19 // Operate the EPM cargo gripper low=off, middle=neutral, high=on
#define AUX_SWITCH_EKF 20 // Enable NavEKF
#define AUX_SWITCH_PARACHUTE_ENABLE 21 // Parachute enable/disable
#define AUX_SWITCH_PARACHUTE_RELEASE 22 // Parachute release
#define AUX_SWITCH_PARACHUTE_3POS 23 // Parachute disable, enable, release with 3 position switch
// values used by the ap.ch7_opt and ap.ch8_opt flags
#define AUX_SWITCH_LOW 0 // indicates auxiliar switch is in the low position (pwm <1200)
...
...
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