28 Feb
2019
28 Feb
'19
6:48 a.m.
+def variable_len_resp(pipe):
- """
- when length of expected reply is not known, read byte at a time
- until the ack character is found.
- """
- response = b""
- i = 0
- toolong = 256 # arbitrary
- while True:
b = pipe.read(1)
if b == b'\x06':
break
else:
response += b
i += 1
if i > toolong:
LOG.debug("Response too long. got" + util.hexprint(response))
raise errors.RadioError("Response too long.")
Did you have a response to my comments in this part of the first patch?
--Dan