mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
/set suffix for RGB channel setup turning chan on bug fixed
This commit is contained in:
@@ -806,14 +806,22 @@ int Item::Ctrl(short cmd, short n, int *Parameters, boolean send, int suffixCode
|
||||
setVal(st.aslong);
|
||||
if (!suffixCode)
|
||||
{ //
|
||||
if (chActive>0 && !st.v) setCmd(CMD_OFF);
|
||||
else if (chActive==0 && st.v) setCmd(CMD_ON);
|
||||
else setCmd(0);
|
||||
if (chActive>0 && !st.v)
|
||||
{
|
||||
setCmd(CMD_OFF);
|
||||
SendStatus(SEND_COMMAND | SEND_PARAMETERS | SEND_DEFFERED);
|
||||
}
|
||||
else if (chActive==0 && st.v)
|
||||
{
|
||||
setCmd(CMD_ON);
|
||||
SendStatus(SEND_COMMAND | SEND_PARAMETERS | SEND_DEFFERED);
|
||||
}
|
||||
//// else setCmd(0);
|
||||
SendStatus(SEND_PARAMETERS | SEND_DEFFERED);
|
||||
}
|
||||
else
|
||||
{
|
||||
setCmd(0);
|
||||
//// setCmd(0);
|
||||
SendStatus(SEND_PARAMETERS | SEND_DEFFERED);
|
||||
}
|
||||
break;
|
||||
@@ -1739,7 +1747,7 @@ void Item::sendDelayedStatus()
|
||||
// debugSerial<<flags<<F(" Delayed Status ")<<itemArr->name<<endl;
|
||||
if (flags && lanStatus==OPERATION)
|
||||
{
|
||||
SendStatus(SEND_COMMAND | SEND_PARAMETERS);
|
||||
SendStatus(flags);//(SEND_COMMAND | SEND_PARAMETERS);
|
||||
clearFlag(SEND_COMMAND | SEND_PARAMETERS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user