improved bus wait with raii class that updates last access
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user