From a991b4a8238991e669ebaa8f187c039875d8548d Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 3 Feb 2015 05:58:08 +0900 Subject: [PATCH] Linux: handle arming_failed as event --- libraries/AP_Notify/ToneAlarm_Linux.cpp | 7 ++----- libraries/AP_Notify/ToneAlarm_Linux.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libraries/AP_Notify/ToneAlarm_Linux.cpp b/libraries/AP_Notify/ToneAlarm_Linux.cpp index 68adf99620..47679d576b 100644 --- a/libraries/AP_Notify/ToneAlarm_Linux.cpp +++ b/libraries/AP_Notify/ToneAlarm_Linux.cpp @@ -66,11 +66,8 @@ void ToneAlarm_Linux::update() } // 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) { - play_tune(TONE_ARMING_FAILURE_TUNE); - } + if (AP_Notify::events.arming_failed) { + play_tune(TONE_ARMING_FAILURE_TUNE); } // check if arming status has changed diff --git a/libraries/AP_Notify/ToneAlarm_Linux.h b/libraries/AP_Notify/ToneAlarm_Linux.h index e0e85d145c..6104f614f2 100644 --- a/libraries/AP_Notify/ToneAlarm_Linux.h +++ b/libraries/AP_Notify/ToneAlarm_Linux.h @@ -44,7 +44,6 @@ private: bool failsafe_battery : 1; // true if battery failsafe bool gps_glitching : 1; // true if gps position is not good bool failsafe_gps : 1; // true if gps failsafe - bool arming_failed : 1; // false = failing checks, true = passed bool parachute_release : 1; // true if parachute is being released } flags; };