From abb667fac3a4b397679643b8c255a6a7a33c4d0e Mon Sep 17 00:00:00 2001 From: pepevalbe Date: Thu, 31 Mar 2016 20:20:14 +0200 Subject: [PATCH] AP_Notify: enable/disable buzzer in Linux based boards --- libraries/AP_Notify/ToneAlarm_Linux.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Notify/ToneAlarm_Linux.cpp b/libraries/AP_Notify/ToneAlarm_Linux.cpp index e475d33014..394bd77135 100644 --- a/libraries/AP_Notify/ToneAlarm_Linux.cpp +++ b/libraries/AP_Notify/ToneAlarm_Linux.cpp @@ -66,6 +66,11 @@ void ToneAlarm_Linux::update() return; } + // exit if buzzer is not enabled + if (pNotify->buzzer_enabled() == false) { + return; + } + // check for arming failure if (AP_Notify::events.arming_failed) { play_tune(TONE_ARMING_FAILURE_TUNE);