mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
apply frame header fix to tcp as well
This commit is contained in:
parent
52ad5c201c
commit
eca375dc8a
1 changed files with 4 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ class TCPConnection:
|
|||
idx = data.find(b"\x3e")
|
||||
if idx < 0: # no start of frame
|
||||
return
|
||||
# Discard any leading junk bytes before the actual frame marker.
|
||||
# Some radios interleave console/debug text on the same UART, so
|
||||
# valid companion frames may begin at an offset inside the chunk.
|
||||
data = data[idx:]
|
||||
self.header = data[0:1]
|
||||
data = data[1:]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue