Skip to content

Commit

Permalink
add missing offset to telgram::to_string()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Sep 16, 2021
1 parent 538a9cf commit db34785
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/telegram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ std::string Telegram::to_string() const {
uint8_t data[EMS_MAX_TELEGRAM_LENGTH];
uint8_t length = 0;
data[0] = this->src ^ RxService::ems_mask();
data[3] = this->offset;
if (this->operation == Telegram::Operation::TX_READ) {
data[1] = this->dest | 0x80;
data[4] = this->message_data[0];
Expand Down

2 comments on commit db34785

@proddy
Copy link
Contributor

@proddy proddy commented on db34785 Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't believe I missed that - how did you find it?

@MichaelDvP
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offset 03 in issue #111 irritated me and i checked how this message was generated.

Please sign in to comment.