mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Исправляем валидацию базового параметра округления
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
"plus": 0,
|
||||
"multiply": 1,
|
||||
"round": 100,
|
||||
"round": 2,
|
||||
"int": 10
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user