Исправляем валидацию базового параметра округления

This commit is contained in:
2022-04-26 23:03:00 +03:00
parent 900ff95429
commit c658343e7f
2 changed files with 2 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ String IoTItem::getID() {
String IoTItem::getValue() {
if (value.isDecimal)
if (_round >= 0) {
if (_round >= 0 && _round <= 6) {
char buf[15];
sprintf(buf, ("%1." + (String)_round + "f").c_str(), value.valD);
return (String)buf;

View File

@@ -15,7 +15,7 @@
"plus": 0,
"multiply": 1,
"round": 100,
"round": 2,
"int": 10
}
]