-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement table cell updates: start with bool: update module enabled #19
Conversation
index.css: modal window using gradient colors index.js: - add # in table cells (rowNr) - add disabled to checkbox, button and range if ro - processVarNode: use hasOwnProperty to catch boolean false also - processVarNode: add isArray to process array values (currently checkbox only supported -> WIP) pio.ini: disable Artnet and ddp temporarily Module.h: add enabledChanged SysModModel: - setValueB: add rowNr parameter (tbd for other types): for rows: create array if not yet and assign value to array element SysModModules: - mdlEnabled.chFun: create value array if not exist, if exists set modules enabled status and trigger enabledChange function SysModUI: - setChFunAndWs: add check for value arrays - processJson: check if var id has # (rowNr) - processJson: if rowNr, use the value array to check the right value - processJson: if bool call setValueB with rownr SysModWeb: - add print clIsFull.chFun - call setValueB with rowNr - add addResponseArray to deal with value arrays
@@ -14,7 +14,9 @@ lib_deps = | |||
|
|||
[appmod_leds] | |||
build_flags = | |||
-D APPMOD_LEDS -D USERMOD_ARTNET -D USERMOD_DDP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? Surely if we have the option to enable/disable at runtime why exclude these from the build? Especially as they have no library dependencies so have little impact of image size or compile time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just temporary, as a consequence of me merging too soon in main 😉, if I run this I got all kinds of messages so I propose until the mods are working fine we leave it of in main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set the mod to be present, but disabled at runtime by default?
@@ -35,6 +35,7 @@ class Module { | |||
virtual void loop() {} | |||
|
|||
virtual void connected() {} | |||
virtual void enabledChanged(bool tf) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have a module disabled before we connect WiFi, connect WiFi and then enable, the module will never get the connected call so might not function properly. Should we trigger a connected call for that module on enable or expect every module to handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think connected() and enabledChanged() are the 'orchestrators' and they can call functions which do the work.
So function to connect can be called by both and if called by one of them, checks if connected is true and if enabled is true.
index.css: modal window using gradient colors
index.js:
pio.ini: disable Artnet and ddp temporarily
Module.h: add enabledChanged
SysModModel:
SysModModules:
SysModUI:
SysModWeb: