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
6a90b772
Commit
6a90b772
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
OBC: added FS_TERM_PIN option
this sets a pin for flight termination
parent
b2a74951
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
libraries/APM_OBC/APM_OBC.cpp
+15
-0
15 additions, 0 deletions
libraries/APM_OBC/APM_OBC.cpp
libraries/APM_OBC/APM_OBC.h
+2
-0
2 additions, 0 deletions
libraries/APM_OBC/APM_OBC.h
with
17 additions
and
0 deletions
libraries/APM_OBC/APM_OBC.cpp
+
15
−
0
View file @
6a90b772
...
...
@@ -49,6 +49,12 @@ const AP_Param::GroupInfo APM_OBC::var_info[] PROGMEM = {
// @User: Advanced
AP_GROUPINFO
(
"TERM_ACTION"
,
6
,
APM_OBC
,
_terminate_action
,
0
),
// @Param: TERM_PIN
// @DisplayName: Terminate Pin
// @Description: This sets a digital output pin to set high on flight termination
// @User: Advanced
AP_GROUPINFO
(
"TERM_PIN"
,
7
,
APM_OBC
,
_terminate_pin
,
-
1
),
AP_GROUPEND
};
...
...
@@ -169,4 +175,13 @@ APM_OBC::check(APM_OBC::control_mode mode,
_heartbeat_pin_value
=
!
_heartbeat_pin_value
;
digitalWrite
(
_heartbeat_pin
,
_heartbeat_pin_value
);
}
// set the terminate pin
if
(
_terminate_pin
!=
-
1
)
{
if
(
_terminate_pin
!=
_last_terminate_pin
)
{
pinMode
(
_terminate_pin
,
OUTPUT
);
_last_terminate_pin
=
_terminate_pin
;
}
digitalWrite
(
_terminate_pin
,
_terminate
?
HIGH
:
LOW
);
}
}
This diff is collapsed.
Click to expand it.
libraries/APM_OBC/APM_OBC.h
+
2
−
0
View file @
6a90b772
...
...
@@ -65,12 +65,14 @@ private:
// digital output pins for communicating with the failsafe board
AP_Int8
_heartbeat_pin
;
AP_Int8
_manual_pin
;
AP_Int8
_terminate_pin
;
AP_Int8
_terminate
;
AP_Int8
_terminate_action
;
// last pins to cope with changing at runtime
int8_t
_last_heartbeat_pin
;
int8_t
_last_manual_pin
;
int8_t
_last_terminate_pin
;
// waypoint numbers to jump to on failsafe conditions
AP_Int8
_wp_comms_hold
;
...
...
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