feat: Add "Enable" button to all SF/GF (#3024) (#3601)

Co-authored-by: eshifri <eshifri@hotmail.com>
Co-authored-by: philmoz <philmoz@users.noreply.github.com>
This commit is contained in:
Peter Feerick
2023-12-03 12:23:34 +10:00
committed by GitHub
co-authored by eshifri philmoz
parent 878a365e72
commit ee73fa47f0
33 changed files with 262 additions and 194 deletions
+4 -7
View File
@@ -114,7 +114,7 @@ bool isRepeatDelayElapsed(const CustomFunctionData * functions, CustomFunctionsC
{
const CustomFunctionData * cfn = &functions[index];
tmr10ms_t tmr10ms = get_tmr10ms();
uint8_t repeatParam = CFN_PLAY_REPEAT(cfn);
int8_t repeatParam = CFN_PLAY_REPEAT(cfn);
if (!IS_SILENCE_PERIOD_ELAPSED() && repeatParam == CFN_PLAY_REPEAT_NOSTART) {
functionsContext.lastFunctionTime[index] = tmr10ms;
}
@@ -156,12 +156,9 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
if (swtch) {
MASK_CFN_TYPE switch_mask = ((MASK_CFN_TYPE)1 << i);
bool active = getSwitch(
swtch, IS_PLAY_FUNC(CFN_FUNC(cfn)) ? GETSWITCH_MIDPOS_DELAY : 0);
if (HAS_ENABLE_PARAM(CFN_FUNC(cfn))) {
active &= (bool)CFN_ACTIVE(cfn);
}
bool active = getSwitch(swtch, IS_PLAY_FUNC(CFN_FUNC(cfn)) ? GETSWITCH_MIDPOS_DELAY : 0);
if (CFN_ACTIVE(cfn) == 0)
active = false;
if (active) {
switch (CFN_FUNC(cfn)) {