Skip to content

Commit

Permalink
Set effect outside library
Browse files Browse the repository at this point in the history
LedModEffects: add processEffectNr
  • Loading branch information
ewowi committed Jan 15, 2025
1 parent 184d238 commit 373fe28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/App/LedModEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,12 @@ inline uint16_t getRGBWsize(uint16_t nleds){
}
}

//process effect change initiated outside library (ESK)
if (processEffectNr != UINT16_MAX) {
Variable("layers","effect").setValue(processEffectNr, 0);
processEffectNr = UINT16_MAX;
}

} //loop

void LedModEffects::initEffect(LedsLayer &leds, uint8_t rowNr) {
Expand Down
2 changes: 2 additions & 0 deletions src/App/LedModEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class LedModEffects:public SysModule {

uint8_t doInitEffectRowNr = UINT8_MAX;

uint16_t processEffectNr = UINT16_MAX; //process effect change initiated outside library (ESK)

LedModEffects();

void setup() override;
Expand Down

0 comments on commit 373fe28

Please sign in to comment.