Skip to content

Commit

Permalink
Rename parameters to controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ewowi committed Aug 10, 2023
1 parent 9d38665 commit ac09c02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/App/AppEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Effect {
virtual const char * name() { return nullptr;}
virtual void setup() {}
virtual void loop() {}
virtual bool parameters(JsonObject parentVar) {return false;}
virtual bool controls(JsonObject parentVar) {return false;}
};

class RainbowEffect: public Effect {
Expand Down Expand Up @@ -112,7 +112,7 @@ class BPMEffect: public Effect {
ledsV[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));
}
}
bool parameters(JsonObject parentVar) {
bool controls(JsonObject parentVar) {
return false;
}
};
Expand Down Expand Up @@ -228,7 +228,7 @@ class Frizzles2D: public Effect {
}
blur2d(ledsP, LedsV::widthV, LedsV::heightV, mdl->getValue("blur")); //this is tricky as FastLed is not aware of our virtual
}
bool parameters(JsonObject parentVar) {
bool controls(JsonObject parentVar) {
ui->initSlider(parentVar, "speed", 128, false);
ui->initSlider(parentVar, "intensity", 128, false);
ui->initSlider(parentVar, "blur", 128, false);
Expand Down Expand Up @@ -261,7 +261,7 @@ class Lines2D: public Effect {
}
}

bool parameters(JsonObject parentVar) {
bool controls(JsonObject parentVar) {
ui->initCheckBox(parentVar, "Vertical", false, false);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/App/AppModLedFixGen.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class AppModLedFixGen:public Module {
count
};

//generate dynamic html for fixture parameters
//generate dynamic html for fixture controls
static void ledFixGenChFun(JsonObject var) {
JsonObject parentVar = mdl->findVar(var["id"]);
parentVar.remove("n"); //tbd: we should also remove the uiFun and chFun !!
Expand Down
4 changes: 2 additions & 2 deletions src/App/AppModLeds.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class AppModLeds:public Module {

Effect* effect = effects[fx];
effect->setup(); //if changed then run setup once (like call==0 in WLED)
if (!effect->parameters(parentVar)) {
if (!effect->controls(parentVar)) {

for (int i=0; i<5; i++) {
uint8_t nameNr = random8(6);
Expand Down Expand Up @@ -139,7 +139,7 @@ class AppModLeds:public Module {
break;
}
} //for loop
} //! parameters
} //! controls
print->printJson("parentVar", parentVar);
web->sendDataWs(parentVar); //always send, also when no children, to remove them from ui
} // fx < size
Expand Down

0 comments on commit ac09c02

Please sign in to comment.