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
c983de9d
Commit
c983de9d
authored
12 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
APM_OBC: changed termination servo values, and added loop counter
parent
9ffeecdf
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
libraries/APM_OBC/Failsafe_Board/Failsafe_Board.pde
+6
-1
6 additions, 1 deletion
libraries/APM_OBC/Failsafe_Board/Failsafe_Board.pde
with
6 additions
and
1 deletion
libraries/APM_OBC/Failsafe_Board/Failsafe_Board.pde
+
6
−
1
View file @
c983de9d
...
@@ -121,7 +121,7 @@ static void set_servos_terminate(uint8_t obc_mode)
...
@@ -121,7 +121,7 @@ static void set_servos_terminate(uint8_t obc_mode)
{
{
set_mux_mode
(
MUX_MODE_MICRO
);
set_mux_mode
(
MUX_MODE_MICRO
);
if
(
obc_mode
)
{
if
(
obc_mode
)
{
set_servos
(
2
000
,
2000
,
1000
,
2
000
);
set_servos
(
1
000
,
2000
,
1000
,
1
000
);
}
else
{
}
else
{
set_servos
(
1500
,
1500
,
1200
,
1500
);
set_servos
(
1500
,
1500
,
1200
,
1500
);
}
}
...
@@ -161,6 +161,9 @@ void loop()
...
@@ -161,6 +161,9 @@ void loop()
static
uint8_t
led_state
;
static
uint8_t
led_state
;
static
bool
has_terminated
=
false
;
static
bool
has_terminated
=
false
;
static
uint8_t
termination_counter
;
static
uint8_t
termination_counter
;
static
uint16_t
loop_counter
;
loop_counter
++
;
// check for heartbeat
// check for heartbeat
update_heartbeat
();
update_heartbeat
();
...
@@ -188,8 +191,10 @@ void loop()
...
@@ -188,8 +191,10 @@ void loop()
Serial
.
print
(
" TERM1:"
);
Serial
.
print
(
terminate_primary
);
Serial
.
print
(
" TERM1:"
);
Serial
.
print
(
terminate_primary
);
Serial
.
print
(
" TERM2:"
);
Serial
.
print
(
terminate_backup
);
Serial
.
print
(
" TERM2:"
);
Serial
.
print
(
terminate_backup
);
Serial
.
print
(
" TERMINATED:"
);
Serial
.
print
(
has_terminated
);
Serial
.
print
(
" TERMINATED:"
);
Serial
.
print
(
has_terminated
);
Serial
.
print
(
" LOOP:"
);
Serial
.
print
(
loop_counter
);
Serial
.
println
();
Serial
.
println
();
delayMicroseconds
(
5000
);
delayMicroseconds
(
5000
);
loop_counter
=
0
;
// flash LED once a second so we know failsafe board
// flash LED once a second so we know failsafe board
// is working
// is working
led_state
=
!
led_state
;
led_state
=
!
led_state
;
...
...
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