mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-31 02:59:10 +03:00
fix overlaping while reading sequence of EMS1.0 telegrams
This commit is contained in:
@@ -613,19 +613,10 @@ uint16_t TxService::read_next_tx(uint8_t offset) {
|
|||||||
if (telegram_last_->offset != offset) {
|
if (telegram_last_->offset != offset) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
<<<<<<< Updated upstream
|
|
||||||
|
|
||||||
uint8_t add_offset;
|
|
||||||
if (telegram_last_->dest == 0x08 && telegram_last_->type_id == 0xC2) { //fix for overlapping 0xC2 telegrams from Boiler. Are other telegrams also affected?
|
|
||||||
add_offset = 27;
|
|
||||||
} else {
|
|
||||||
add_offset = 25;
|
|
||||||
=======
|
|
||||||
|
|
||||||
uint8_t add_offset = 25; //for EMS+ telegram increase offset by 25
|
uint8_t add_offset = 25; //for EMS+ telegram increase offset by 25
|
||||||
if (telegram_last_->type_id < 0x100) { //but for EMS1.0 by 27
|
if (telegram_last_->type_id < 0x100) { //but for EMS1.0 by 27
|
||||||
add_offset = 27;
|
add_offset = 27;
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UINT8_MAX - telegram_last_->offset < add_offset) { //stop if new offset would overflow
|
if (UINT8_MAX - telegram_last_->offset < add_offset) { //stop if new offset would overflow
|
||||||
|
|||||||
Reference in New Issue
Block a user