mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
Fix wrong escape bit
This commit is contained in:
parent
ee2bb0330a
commit
bf6083ff1c
@ -206,14 +206,9 @@ void ZigbeeInputLoop(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (zigbee_buffer->len() < ZIGBEE_BUFFER_SIZE) {
|
if (zigbee_buffer->len() < ZIGBEE_BUFFER_SIZE) {
|
||||||
// check if escape
|
|
||||||
if (ZIGBEE_EZSP_ESCAPE == zigbee_in_byte) {
|
|
||||||
escape = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (escape) {
|
if (escape) {
|
||||||
// invert bit 5
|
// invert bit 5
|
||||||
zigbee_in_byte ^= 0x10;
|
zigbee_in_byte ^= 0x20;
|
||||||
escape = false;
|
escape = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,7 +456,7 @@ void ZigbeeEZSPSend_Out(uint8_t out_byte) {
|
|||||||
case 0x1A: // Cancel byte
|
case 0x1A: // Cancel byte
|
||||||
case 0x7D: // Escape byte
|
case 0x7D: // Escape byte
|
||||||
ZigbeeSerial->write(ZIGBEE_EZSP_ESCAPE); // send Escape byte 0x7D
|
ZigbeeSerial->write(ZIGBEE_EZSP_ESCAPE); // send Escape byte 0x7D
|
||||||
ZigbeeSerial->write(out_byte ^ 0x10); // send with bit 5 inverted
|
ZigbeeSerial->write(out_byte ^ 0x20); // send with bit 5 inverted
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ZigbeeSerial->write(out_byte); // send unchanged
|
ZigbeeSerial->write(out_byte); // send unchanged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user