[Horus] Fixes #3770 - needs tests
This commit is contained in:
@@ -230,10 +230,11 @@ bool isRepeatDelayElapsed(const CustomFunctionData * functions, CustomFunctionsC
|
||||
const CustomFunctionData * cfn = &functions[index];
|
||||
tmr10ms_t tmr10ms = get_tmr10ms();
|
||||
uint8_t repeatParam = CFN_PLAY_REPEAT(cfn);
|
||||
if (!IS_SILENCE_PERIOD_ELAPSED() && repeatParam == CFN_PLAY_REPEAT_NOSTART) {
|
||||
if (repeatParam == CFN_PLAY_REPEAT_NOSTART && !IS_SILENCE_PERIOD_ELAPSED()) {
|
||||
functionsContext.lastFunctionTime[index] = tmr10ms;
|
||||
return false;
|
||||
}
|
||||
if (!functionsContext.lastFunctionTime[index] || (repeatParam && repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-functionsContext.lastFunctionTime[index])>=100*repeatParam)) {
|
||||
else if (!functionsContext.lastFunctionTime[index] || (repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-functionsContext.lastFunctionTime[index])>=100*repeatParam)) {
|
||||
functionsContext.lastFunctionTime[index] = tmr10ms;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user