mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
rename function device_info to device_info_web as it was a little confusing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user