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
e3e7fc28
Commit
e3e7fc28
authored
11 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Notify: add parachute release tune for Pixhawk
parent
47c1cb8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libraries/AP_Notify/AP_Notify.h
+1
-0
1 addition, 0 deletions
libraries/AP_Notify/AP_Notify.h
libraries/AP_Notify/ToneAlarm_PX4.cpp
+11
-1
11 additions, 1 deletion
libraries/AP_Notify/ToneAlarm_PX4.cpp
libraries/AP_Notify/ToneAlarm_PX4.h
+1
-0
1 addition, 0 deletions
libraries/AP_Notify/ToneAlarm_PX4.h
with
13 additions
and
1 deletion
libraries/AP_Notify/AP_Notify.h
+
1
−
0
View file @
e3e7fc28
...
...
@@ -43,6 +43,7 @@ public:
uint16_t
failsafe_battery
:
1
;
// 1 if battery failsafe
uint16_t
failsafe_gps
:
1
;
// 1 if gps failsafe
uint16_t
arming_failed
:
1
;
// 1 if copter failed to arm after user input
uint16_t
parachute_release
:
1
;
// 1 if parachute is being released
// additional flags
uint16_t
external_leds
:
1
;
// 1 if external LEDs are enabled (normally only used for copter)
...
...
This diff is collapsed.
Click to expand it.
libraries/AP_Notify/ToneAlarm_PX4.cpp
+
11
−
1
View file @
e3e7fc28
...
...
@@ -64,7 +64,8 @@ void ToneAlarm_PX4::update()
if
(
_tonealarm_fd
==
-
1
)
{
return
;
}
// check for arming failure
if
(
flags
.
arming_failed
!=
AP_Notify
::
flags
.
arming_failed
)
{
flags
.
arming_failed
=
AP_Notify
::
flags
.
arming_failed
;
if
(
flags
.
arming_failed
)
{
...
...
@@ -110,6 +111,15 @@ void ToneAlarm_PX4::update()
play_tune
(
TONE_GPS_WARNING_TUNE
);
}
}
// check parachute release
if
(
flags
.
parachute_release
!=
AP_Notify
::
flags
.
parachute_release
)
{
flags
.
parachute_release
=
AP_Notify
::
flags
.
parachute_release
;
if
(
flags
.
parachute_release
)
{
// parachute release warning tune
play_tune
(
TONE_PARACHUTE_RELEASE_TUNE
);
}
}
}
#endif // CONFIG_HAL_BOARD == HAL_BOARD_PX4
This diff is collapsed.
Click to expand it.
libraries/AP_Notify/ToneAlarm_PX4.h
+
1
−
0
View file @
e3e7fc28
...
...
@@ -42,6 +42,7 @@ private:
uint8_t
gps_glitching
:
1
;
// 1 if gps position is not good
uint8_t
failsafe_gps
:
1
;
// 1 if gps failsafe
uint8_t
arming_failed
:
1
;
// 0 = failing checks, 1 = passed
uint8_t
parachute_release
:
1
;
// 1 if parachute is being released
}
flags
;
};
...
...
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