From 6a3b539a228162187c83f19c74ff8a98869c1efb Mon Sep 17 00:00:00 2001 From: "bernet.andre@gmail.com" Date: Thu, 23 May 2013 22:48:29 +0000 Subject: [PATCH] Bind/Rangecheck sound for PXX and DSM --- src/opentx.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/opentx.cpp b/src/opentx.cpp index bb49111fd..a49dc0833 100644 --- a/src/opentx.cpp +++ b/src/opentx.cpp @@ -3528,11 +3528,13 @@ void doMixerCalculations() #if defined(PXX) static uint8_t count_pxx = 0; - if((pxxFlag[INTERNAL_MODULE] & PXX_SEND_RANGECHECK) || (pxxFlag[INTERNAL_MODULE] & PXX_SEND_RXNUM) || (pxxFlag[EXTERNAL_MODULE] & PXX_SEND_RANGECHECK) || (pxxFlag[EXTERNAL_MODULE] & PXX_SEND_RXNUM)) - if (++count_pxx >= 250) { - AUDIO_PLAY(AU_FRSKY_CHEEP); - count_pxx = 0; - } + for (uint8_t i = 0; i < NUM_MODULES; i++) { + if((pxxFlag[i] & PXX_SEND_RANGECHECK) || (pxxFlag[i] & PXX_SEND_RXNUM)) + if (++count_pxx >= 250) { + AUDIO_PLAY(AU_FRSKY_CHEEP); + count_pxx = 0; + } + } #endif #if defined(CPUARM)