From 55680a13fe713ababf5e5ff26bd8c5db7812d3b2 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 1 Feb 2012 14:07:32 +0000 Subject: [PATCH] No need for frskyeventSample which resets the AUDIO queue! --- src/audio.cpp | 15 --------------- src/audio.h | 6 ------ 2 files changed, 21 deletions(-) diff --git a/src/audio.cpp b/src/audio.cpp index 2d9c36fdf..df9db0515 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -42,10 +42,6 @@ void audioQueue::aqinit() toneHaptic = 0; hapticTick = 0; #endif - -#ifdef FRSKY - frskySample = 0; -#endif } bool audioQueue::busy() @@ -167,17 +163,6 @@ void audioQueue::playASAP(uint8_t tFreq, uint8_t tLen, uint8_t tPause, } #ifdef FRSKY - -//this is done so the menu selections only plays tone once! -void audioQueue::frskyeventSample(uint8_t e) -{ - if(frskySample != e) { - aqinit(); //flush the queue - frskyevent(e); - frskySample = e; - } -} - void audioQueue::frskyevent(uint8_t e) { if (empty()) { diff --git a/src/audio.h b/src/audio.h index 1cb7492ea..6518b9aee 100644 --- a/src/audio.h +++ b/src/audio.h @@ -67,7 +67,6 @@ #define AU_TX_BATTERY_LOW (19) #ifdef FRSKY - #define AU_FRSKY_WARN1 (0) #define AU_FRSKY_WARN2 (1) #define AU_FRSKY_CHEEP (2) @@ -112,7 +111,6 @@ class audioQueue #if defined(FRSKY) void frskyevent(uint8_t e); - void frskyeventSample(uint8_t e); #endif #if defined(ISER9X) @@ -186,10 +184,6 @@ inline void driver() { uint8_t queueTonePause[AUDIO_QUEUE_LENGTH]; uint8_t queueToneRepeat[AUDIO_QUEUE_LENGTH]; -#ifdef FRSKY - uint8_t frskySample; -#endif - #ifdef HAPTIC uint8_t toneHaptic; uint8_t hapticTick;