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
8b497cc6
Commit
8b497cc6
authored
12 years ago
by
rmackay9
Browse files
Options
Downloads
Patches
Plain Diff
ArduCopter: log watchdog event to dataflash
parent
607aa7c0
No related branches found
Branches containing commit
Tags
ArduCopter-2.7.2
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ArduCopter/defines.h
+3
-2
3 additions, 2 deletions
ArduCopter/defines.h
ArduCopter/events.pde
+2
-2
2 additions, 2 deletions
ArduCopter/events.pde
ArduCopter/failsafe.pde
+2
-1
2 additions, 1 deletion
ArduCopter/failsafe.pde
with
7 additions
and
5 deletions
ArduCopter/defines.h
+
3
−
2
View file @
8b497cc6
...
...
@@ -446,8 +446,9 @@ enum gcs_severity {
// subsystem specific error codes -- radio
#define ERROR_CODE_RADIO_LATE_FRAME 2
// subsystem specific error codes -- failsafe
#define ERROR_CODE_RADIO_FAILSAFE_THROTTLE 2
#define ERROR_CODE_RADIO_FAILSAFE_BATTERY 3
#define ERROR_CODE_FAILSAFE_THROTTLE 2
#define ERROR_CODE_FAILSAFE_BATTERY 3
#define ERROR_CODE_FAILSAFE_WATCHDOG 4
...
...
This diff is collapsed.
Click to expand it.
ArduCopter/events.pde
+
2
−
2
View file @
8b497cc6
...
...
@@ -48,7 +48,7 @@ static void failsafe_on_event()
}
// log the error to the dataflash
Log_Write_Error
(
ERROR_SUBSYSTEM_FAILSAFE
,
ERROR_CODE_
RADIO_
FAILSAFE_THROTTLE
);
Log_Write_Error
(
ERROR_SUBSYSTEM_FAILSAFE
,
ERROR_CODE_FAILSAFE_THROTTLE
);
}
...
...
@@ -95,7 +95,7 @@ static void low_battery_event(void)
// warn the ground station and log to dataflash
gcs_send_text_P
(
SEVERITY_LOW
,
PSTR
(
"Low Battery!"
));
Log_Write_Error
(
ERROR_SUBSYSTEM_FAILSAFE
,
ERROR_CODE_
RADIO_
FAILSAFE_BATTERY
);
Log_Write_Error
(
ERROR_SUBSYSTEM_FAILSAFE
,
ERROR_CODE_FAILSAFE_BATTERY
);
#if COPTER_LEDS == ENABLED
if
(
bitRead
(
g
.
copter_leds_mode
,
3
)
)
{
// Only Activate if a battery is connected to avoid alarm on USB only
...
...
This diff is collapsed.
Click to expand it.
ArduCopter/failsafe.pde
+
2
−
1
View file @
8b497cc6
...
...
@@ -48,13 +48,14 @@ void failsafe_check(uint32_t tnow)
in_failsafe
=
true
;
}
if
(
in_failsafe
&&
tnow
-
failsafe_last_timestamp
>
1000000
)
{
if
(
failsafe_enabled
&&
in_failsafe
&&
tnow
-
failsafe_last_timestamp
>
1000000
)
{
// disarm motors every second
failsafe_last_timestamp
=
tnow
;
if
(
motors
.
armed
())
{
motors
.
armed
(
false
);
set_armed
(
true
);
motors
.
output
();
Log_Write_Error
(
ERROR_SUBSYSTEM_FAILSAFE
,
ERROR_CODE_FAILSAFE_WATCHDOG
);
}
}
}
\ No newline at end of file
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