mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
PS_16_DZ: leave space for trailing 0-byte
This commit is contained in:
parent
49403243d5
commit
f75c4a27ad
@ -149,7 +149,7 @@ void PS16DZSerialInput(void)
|
|||||||
yield();
|
yield();
|
||||||
byte serial_in_byte = PS16DZSerial->read();
|
byte serial_in_byte = PS16DZSerial->read();
|
||||||
if (serial_in_byte != 0x1B){
|
if (serial_in_byte != 0x1B){
|
||||||
if (ps16dz_byte_counter >= PS16DZ_BUFFER_SIZE) {
|
if (ps16dz_byte_counter >= PS16DZ_BUFFER_SIZE - 1) {
|
||||||
memset(ps16dz_rx_buffer, 0, PS16DZ_BUFFER_SIZE);
|
memset(ps16dz_rx_buffer, 0, PS16DZ_BUFFER_SIZE);
|
||||||
ps16dz_byte_counter = 0;
|
ps16dz_byte_counter = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user