-
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
Adding status info for WLED sync #34
Conversation
for (JsonObject childVar: mdl->varN("clTbl")) { | ||
ui->callVarFun(childVar, UINT8_MAX, f_ValueFun); | ||
} |
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.
Do I need this bit? Wasn't sure what it did
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.
Nope
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 pushed a commit where I renamed varN to varChildren
void loop1s() { | ||
for (JsonObject childVar: mdl->varN("clTbl")) { | ||
ui->callVarFun(childVar, UINT8_MAX, f_ValueFun); | ||
} |
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.
This for loop is not needed here, is needed when you want to repopulate the model values for a table
for (JsonObject childVar: mdl->varN("clTbl")) { | ||
ui->callVarFun(childVar, UINT8_MAX, f_ValueFun); | ||
} |
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.
Nope
for (JsonObject childVar: mdl->varN("clTbl")) { | ||
ui->callVarFun(childVar, UINT8_MAX, f_ValueFun); | ||
} |
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 pushed a commit where I renamed varN to varChildren
for (JsonObject childVar: mdl->varN("clTbl")) { | ||
ui->callVarFun(childVar, UINT8_MAX, f_ValueFun); | ||
} | ||
mdl->setUIValueV("wledAudioStatus", "%d, %d", sync, sync.lastPacketTime); |
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.
sync is a class and cannot be used as %d parameter, caused crashes here, so a unsigned from sync should be choosen or sync should be removed
@@ -28,6 +28,15 @@ class UserModWLEDAudio:public SysModule { | |||
//setup filesystem | |||
void setup() { | |||
SysModule::setup(); | |||
parentVar = ui->initUserMod(parentVar, name); |
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.
There was a bug that it was required to specify the order of a module. Is fixed and improved in latest main so merge main into this PR and it should work.
Still it is advisable to specify a module order otherwise it will be shown first in the UI. As follows:
mdl->varSetFixedOrder(parentVar, 5300);
Trying to display when we are getting the audio data, what version etc