mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Gisteresis termostat
This commit is contained in:
@@ -30,7 +30,28 @@ public:
|
||||
|
||||
String setEventSign = selectFromMarkerToMarker(condition, " ", 1);
|
||||
String setEventValue = selectFromMarkerToMarker(condition, " ", 2);
|
||||
if (!isDigitStr(setEventValue)) setEventValue = getValue(setEventValue); //jsonReadStr(configLiveJson , setEventValue);
|
||||
|
||||
if (!isDigitStr(setEventValue)) {
|
||||
if (setEventValue.indexOf("+-") != -1) {
|
||||
String setEventValueName = selectToMarker(setEventValue, "+-");
|
||||
String gisteresisValue = selectToMarkerLast(setEventValue, "+-");
|
||||
gisteresisValue.replace("+-", "");
|
||||
String value = getValue(setEventValueName);
|
||||
String upValue = String(value.toFloat() + gisteresisValue.toFloat());
|
||||
String lowValue = String(value.toFloat() - gisteresisValue.toFloat());
|
||||
|
||||
if (setEventSign == ">") {
|
||||
setEventValue = upValue;
|
||||
}
|
||||
else if (setEventSign == "<") {
|
||||
setEventValue = lowValue;
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
setEventValue = getValue(setEventValue);
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user