Skip to content

Commit

Permalink
add back process dest, fixes #1275
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Sep 9, 2023
1 parent 4bec32e commit 2f5b7cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/emsdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_) {
Expand Down
2 changes: 2 additions & 0 deletions src/emsesp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2f5b7cd

Please sign in to comment.