Merge pull request #230 from biveraxe/ver4dev

Дорабатываем режим 2 для экрана Nextion
This commit is contained in:
2022-11-07 12:05:16 +03:00
committed by GitHub

View File

@@ -53,6 +53,10 @@ class UART : public IoTItem {
break;
case 2: // формат команд от Nextion ID=Value
if (msg.indexOf("=") == -1) { // если входящее сообщение не по формату, то работаем как в режиме 0
setValue(msg);
break;
}
String id = selectToMarker(msg, "=");
String valStr = selectToMarkerLast(msg, "=");
valStr.replace("\"", "");
@@ -100,7 +104,7 @@ class UART : public IoTItem {
printStr += eventItem->getID();
printStr += "=";
if (eventItem->value.isDecimal)
printStr += eventItem->value.valD;
printStr += eventItem->getRoundValue();
else {
printStr += "\"";
printStr += eventItem->value.valS;