add missing offset to telgram::to_string()

This commit is contained in:
MichaelDvP
2021-09-16 17:14:22 +02:00
committed by GitHub
parent 538a9cf642
commit db34785be0

View File

@@ -84,6 +84,7 @@ std::string Telegram::to_string() const {
uint8_t data[EMS_MAX_TELEGRAM_LENGTH]; uint8_t data[EMS_MAX_TELEGRAM_LENGTH];
uint8_t length = 0; uint8_t length = 0;
data[0] = this->src ^ RxService::ems_mask(); data[0] = this->src ^ RxService::ems_mask();
data[3] = this->offset;
if (this->operation == Telegram::Operation::TX_READ) { if (this->operation == Telegram::Operation::TX_READ) {
data[1] = this->dest | 0x80; data[1] = this->dest | 0x80;
data[4] = this->message_data[0]; data[4] = this->message_data[0];