rename function device_info to device_info_web as it was a little confusing

This commit is contained in:
proddy
2020-09-07 11:00:53 +02:00
parent 897aa91229
commit 9f5849590c
21 changed files with 23 additions and 22 deletions

View File

@@ -541,13 +541,14 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
}
// calls the device handler's function to populate a json doc with device info
void EMSESP::device_info(const uint8_t unique_id, JsonObject & root) {
// to be used in the Web UI
void EMSESP::device_info_web(const uint8_t unique_id, JsonObject & root) {
for (const auto & emsdevice : emsdevices) {
if (emsdevice) {
if (emsdevice->unique_id() == unique_id) {
root["deviceName"] = emsdevice->to_string_short(); // can;t use c_str() because of scope
JsonArray data = root.createNestedArray("deviceData");
emsdevice->device_info(data);
emsdevice->device_info_web(data);
return;
}
}