mirror of https://github.com/ArduPilot/ardupilot
AP_Notify: use NTF_BUZZ_ENABLE to disable tonealarm
This commit is contained in:
parent
315a33ed10
commit
397ba488db
|
@ -33,6 +33,9 @@ extern const AP_HAL::HAL& hal;
|
|||
|
||||
bool Buzzer::init()
|
||||
{
|
||||
if (pNotify->buzzer_enabled() == false) {
|
||||
return false;
|
||||
}
|
||||
#if defined(HAL_BUZZER_PIN)
|
||||
_pin = HAL_BUZZER_PIN;
|
||||
#else
|
||||
|
|
|
@ -93,6 +93,9 @@ const AP_ToneAlarm::Tone AP_ToneAlarm::_tones[] {
|
|||
|
||||
bool AP_ToneAlarm::init()
|
||||
{
|
||||
if (pNotify->buzzer_enabled() == false) {
|
||||
return false;
|
||||
}
|
||||
if (!hal.util->toneAlarm_init()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue