mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
Remove wrong space- MQTT payload, more memory ctrl
This commit is contained in:
@@ -887,6 +887,11 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
|
||||
}
|
||||
if (itemType==CH_GROUP)
|
||||
{
|
||||
if (fr<350)
|
||||
{
|
||||
errorSerial<<F("Not enough memory for group operation")<<endl;
|
||||
return -1;
|
||||
}
|
||||
if (allowRecursion && itemArg->type == aJson_Array && operation)
|
||||
{
|
||||
digGroup(itemArg,&cmd,subItem);
|
||||
|
||||
@@ -1076,13 +1076,18 @@ char * itemCmd::toString(char * Buffer, int bufLen, int sendFlags, bool scale100
|
||||
{
|
||||
int len;
|
||||
strncpy_P(Buffer, commands_P[cmd.cmdCode], bufLen);
|
||||
strncat(Buffer, " ", bufLen);
|
||||
//strncat(Buffer, " ", bufLen);
|
||||
len=strlen(Buffer);
|
||||
argPtr+=len;
|
||||
bufLen-=len;
|
||||
bufLen--;
|
||||
}
|
||||
if (sendFlags & SEND_PARAMETERS)
|
||||
if (isValue() && (sendFlags & SEND_PARAMETERS))
|
||||
{
|
||||
strncat(Buffer, " ", bufLen);
|
||||
bufLen--;
|
||||
argPtr++;
|
||||
|
||||
switch (cmd.itemArgType)
|
||||
{ short colorTemp;
|
||||
|
||||
@@ -1142,6 +1147,7 @@ char * itemCmd::toString(char * Buffer, int bufLen, int sendFlags, bool scale100
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user