mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 03:49:13 +03:00
Merge pull request #230 from biveraxe/ver4dev
Дорабатываем режим 2 для экрана Nextion
This commit is contained in:
@@ -53,6 +53,10 @@ class UART : public IoTItem {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // формат команд от Nextion ID=Value
|
case 2: // формат команд от Nextion ID=Value
|
||||||
|
if (msg.indexOf("=") == -1) { // если входящее сообщение не по формату, то работаем как в режиме 0
|
||||||
|
setValue(msg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
String id = selectToMarker(msg, "=");
|
String id = selectToMarker(msg, "=");
|
||||||
String valStr = selectToMarkerLast(msg, "=");
|
String valStr = selectToMarkerLast(msg, "=");
|
||||||
valStr.replace("\"", "");
|
valStr.replace("\"", "");
|
||||||
@@ -100,7 +104,7 @@ class UART : public IoTItem {
|
|||||||
printStr += eventItem->getID();
|
printStr += eventItem->getID();
|
||||||
printStr += "=";
|
printStr += "=";
|
||||||
if (eventItem->value.isDecimal)
|
if (eventItem->value.isDecimal)
|
||||||
printStr += eventItem->value.valD;
|
printStr += eventItem->getRoundValue();
|
||||||
else {
|
else {
|
||||||
printStr += "\"";
|
printStr += "\"";
|
||||||
printStr += eventItem->value.valS;
|
printStr += eventItem->value.valS;
|
||||||
|
|||||||
Reference in New Issue
Block a user