diff --git a/src/classes/IoTItem.cpp b/src/classes/IoTItem.cpp index 429392d0..95349149 100644 --- a/src/classes/IoTItem.cpp +++ b/src/classes/IoTItem.cpp @@ -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; diff --git a/src/modules/sensors/Ads1115/items.json b/src/modules/sensors/Ads1115/items.json index 9cfc0bcd..af458b77 100644 --- a/src/modules/sensors/Ads1115/items.json +++ b/src/modules/sensors/Ads1115/items.json @@ -15,7 +15,7 @@ "plus": 0, "multiply": 1, - "round": 100, + "round": 2, "int": 10 } ] \ No newline at end of file