improved bus wait with raii class that updates last access

This commit is contained in:
Emanuele Trabattoni
2025-07-25 10:57:17 +02:00
parent bb0832ad4f
commit 31c6cd9606
14 changed files with 173 additions and 127 deletions

View File

@@ -32,11 +32,12 @@ namespace commands
ArduinoJson::JsonDocument response;
const auto pinfo = dev.seneca.getAll();
response["cmd"] = "getHPpower";
auto values = response["params"].to<JsonObject>();
auto values = response["values"].to<JsonObject>();
values["power"] = pinfo.pAct;
values["current"] = pinfo.a;
values["voltage"] = pinfo.v;
values["energy"] = pinfo.whPar;
LOG_INFO("getHPpower -> power", pinfo.pAct, "current", pinfo.a, "energy", pinfo.whPar);
LOG_INFO("getHPpower -> power", pinfo.pAct, "current", pinfo.a, "voltage", pinfo.v, "energy", pinfo.whPar);
return response;
}