Merge branch 'dev' into dev2

This commit is contained in:
MichaelDvP
2024-02-03 18:38:34 +01:00
9 changed files with 176 additions and 107 deletions

View File

@@ -747,10 +747,20 @@ std::string EMSESP::pretty_telegram(std::shared_ptr<const Telegram> telegram) {
for (const auto & emsdevice : emsdevices) {
if (telegram->operation != Telegram::Operation::RX_READ && emsdevice->is_device_id(src)) {
type_name = emsdevice->telegram_type_name(telegram);
break;
}
}
}
if (type_name.empty()) {
// 2nd fallback, get the type name from dest
for (const auto & emsdevice : emsdevices) {
if (telegram->operation != Telegram::Operation::RX_READ && emsdevice->is_device_id(dest)) {
type_name = emsdevice->telegram_type_name(telegram);
break;
}
}
}
// if we can't find names for the devices, use their hex values
if (src_name.empty()) {
src_name = device_tostring(src);