add back process dest, fixes #1275

This commit is contained in:
MichaelDvP
2023-09-09 12:25:18 +02:00
parent 4bec32ea56
commit 2f5b7cd0aa
2 changed files with 7 additions and 0 deletions

View File

@@ -1767,6 +1767,11 @@ const char * EMSdevice::telegram_type_name(std::shared_ptr<const Telegram> teleg
bool EMSdevice::handle_telegram(std::shared_ptr<const Telegram> telegram) {
for (auto & tf : telegram_functions_) {
if (tf.telegram_type_id_ == telegram->type_id) {
// for telegram desitnation only read telegram
if (telegram->dest == device_id_ && telegram->message_length > 0) {
tf.process_function_(telegram);
return true;
}
// if the data block is empty and we have not received data before, assume that this telegram
// is not recognized by the bus master. So remove it from the automatic fetch list
if (telegram->message_length == 0 && telegram->offset == 0 && !tf.received_) {

View File

@@ -939,6 +939,8 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
emsdevice->add_handlers_ignored(telegram->type_id);
}
break;
} else if (emsdevice->is_device_id(telegram->dest)) {
emsdevice->handle_telegram(telegram);
}
}