mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add back process dest, fixes #1275
This commit is contained in:
@@ -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_) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user