mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
fetch next telegram part for different offset
This commit is contained in:
@@ -642,7 +642,8 @@ uint16_t TxService::read_next_tx(const uint8_t offset, const uint8_t length) {
|
||||
uint8_t message_data = (UINT8_MAX - next_offset) >= next_length ? next_length : UINT8_MAX - next_offset;
|
||||
// check telegram, offset and overflow
|
||||
// some telegrams only reply with one byte less, but have higher offsets (0x10)
|
||||
if (old_length >= (next_length - 1) && telegram_last_->offset == offset) {
|
||||
// some reply with higher offset than requestes and have not_set values intermediate (0xEA)
|
||||
if (old_length >= (next_length - 1) || telegram_last_->offset < offset) {
|
||||
add(Telegram::Operation::TX_READ, telegram_last_->dest, telegram_last_->type_id, next_offset, &message_data, 1, 0, true);
|
||||
return telegram_last_->type_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user