diff --git a/lighthub/item.cpp b/lighthub/item.cpp index d33bf18..4a2f1a4 100644 --- a/lighthub/item.cpp +++ b/lighthub/item.cpp @@ -691,6 +691,12 @@ return false; } //Main routine to control Item +//Return values +// 1 complete +// 3 complete, no action, target reached +// -3 ignored +// -1 system error +// -4 invalid argument int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion) { @@ -911,7 +917,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion) status2Send |= SEND_COMMAND | SEND_IMMEDIATE; break; default: - return -3; + return 3; } status2Send |= SEND_COMMAND; break; @@ -924,7 +930,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion) break; default: debugSerial << F("XOFF skipped. Prev cmd:") << t <type != aJson_Array) || ((numpar = aJson.getArraySize(itemArg)) < 2)) { debugSerial<