Skip to content

Commit

Permalink
E131: channel as value by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Jun 7, 2024
1 parent 9c16579 commit f2da112
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/User/UserModE131.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ class UserModE131:public SysModule {
default: return false;
}});

JsonObject currentVar = ui->initNumber(parentVar, "dch", channel, 1, 512, false, [this](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
JsonObject currentVar = ui->initNumber(parentVar, "dch", &channel, 1, 512, false, [this](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
case f_UIFun:
ui->setLabel(var, "DMX Channel");
ui->setComment(var, "First channel");
return true;
case f_ChangeFun:
channel = var["value"];
for (JsonObject childVar: mdl->varChildren("e131Tbl"))
ui->callVarFun(childVar);
return true;
Expand Down

0 comments on commit f2da112

Please sign in to comment.