From ac09c0253ac1a066b840683179da381612c9f34c Mon Sep 17 00:00:00 2001 From: Ewoud Date: Thu, 10 Aug 2023 11:35:13 +0200 Subject: [PATCH] Rename parameters to controls --- src/App/AppEffects.h | 8 ++++---- src/App/AppModLedFixGen.h | 2 +- src/App/AppModLeds.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/App/AppEffects.h b/src/App/AppEffects.h index 3aa5ca7f..f83341b0 100644 --- a/src/App/AppEffects.h +++ b/src/App/AppEffects.h @@ -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 { @@ -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; } }; @@ -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); @@ -261,7 +261,7 @@ class Lines2D: public Effect { } } - bool parameters(JsonObject parentVar) { + bool controls(JsonObject parentVar) { ui->initCheckBox(parentVar, "Vertical", false, false); return true; } diff --git a/src/App/AppModLedFixGen.h b/src/App/AppModLedFixGen.h index 740bdc9e..3fbf9362 100644 --- a/src/App/AppModLedFixGen.h +++ b/src/App/AppModLedFixGen.h @@ -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 !! diff --git a/src/App/AppModLeds.h b/src/App/AppModLeds.h index 12b1ad53..8b23c7ca 100644 --- a/src/App/AppModLeds.h +++ b/src/App/AppModLeds.h @@ -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); @@ -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