mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Fix Pow R2 and S31 checksum error
Fix Pow R2 and S31 checksum error (#1907)
This commit is contained in:
parent
d1db31fc0a
commit
b8edfddd7e
@ -371,7 +371,12 @@ bool CseSerialInput()
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if (0x5A == serial_in_byte) { // 0x5A - Packet header 2
|
||||
if ((0x5A == serial_in_byte) && (serial_in_byte_counter)) { // 0x5A - Packet header 2
|
||||
if (serial_in_byte_counter > 1) { // Sync buffer with data (issue #1907)
|
||||
serial_in_buffer[0] = serial_in_buffer[--serial_in_byte_counter];
|
||||
serial_in_byte_counter = 1;
|
||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR("CSE: Fixed out-of-sync"));
|
||||
}
|
||||
cse_receive_flag = 1;
|
||||
} else {
|
||||
serial_in_byte_counter = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user