Browse files

Fixed bug in APIFrame.escape()

  • Loading branch information...
1 parent ae0843a commit 8a13de68159589f4424662b48ba34594b462ab28 @pmalmsten pmalmsten committed Sep 11, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 xbee/frame.py
View
3 xbee/frame.py
@@ -112,9 +112,8 @@ def escape(data):
escaped_data = b""
for byte in data:
- if byte in APIFrame.ESCAPE_BYTES:
+ if intToByte(byteToInt(byte)) in APIFrame.ESCAPE_BYTES:
escaped_data += APIFrame.ESCAPE_BYTE
-
escaped_data += intToByte(0x20 ^ byteToInt(byte))
else:
escaped_data += intToByte(byteToInt(byte))

0 comments on commit 8a13de6

Please sign in to comment.