added round to 3 decimals for API JSON (reduced transmitted length)

This commit is contained in:
lumapu 2022-09-18 20:16:20 +02:00
parent 6e39b779f4
commit 50bfbf8a38
2 changed files with 6 additions and 2 deletions

View file

@ -41,6 +41,10 @@ class webApi {
Inverter<> *getInverter(DynamicJsonDocument jsonIn, JsonObject jsonOut);
double round3(double value) {
return (int)(value * 1000 + 0.5) / 1000.0;
}
AsyncWebServer *mSrv;
app *mApp;