From 0d12832d303042dbb84e10f57f98c58e45588d8c Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Sun, 11 Sep 2016 13:41:53 +0200 Subject: [PATCH] Revert "[Horus] Fixes #3770 - needs tests" This reverts commit f131c79b87cbda16f240af9e342ab178fd6c6f28. --- radio/src/functions.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radio/src/functions.cpp b/radio/src/functions.cpp index d090ecdda..3c3adf5d1 100644 --- a/radio/src/functions.cpp +++ b/radio/src/functions.cpp @@ -230,11 +230,10 @@ bool isRepeatDelayElapsed(const CustomFunctionData * functions, CustomFunctionsC const CustomFunctionData * cfn = &functions[index]; tmr10ms_t tmr10ms = get_tmr10ms(); uint8_t repeatParam = CFN_PLAY_REPEAT(cfn); - if (repeatParam == CFN_PLAY_REPEAT_NOSTART && !IS_SILENCE_PERIOD_ELAPSED()) { + if (!IS_SILENCE_PERIOD_ELAPSED() && repeatParam == CFN_PLAY_REPEAT_NOSTART) { functionsContext.lastFunctionTime[index] = tmr10ms; - return false; } - else if (!functionsContext.lastFunctionTime[index] || (repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-functionsContext.lastFunctionTime[index])>=100*repeatParam)) { + if (!functionsContext.lastFunctionTime[index] || (repeatParam && repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-functionsContext.lastFunctionTime[index])>=100*repeatParam)) { functionsContext.lastFunctionTime[index] = tmr10ms; return true; }