|
@@ -97,14 +97,14 @@ def filter_ad2prot_byte(buf): |
|
|
""" |
|
|
""" |
|
|
Return the byte sent in back if valid visible terminal characters or line terminators. |
|
|
Return the byte sent in back if valid visible terminal characters or line terminators. |
|
|
""" |
|
|
""" |
|
|
c = buf[0]; |
|
|
|
|
|
|
|
|
c = buf[0] |
|
|
|
|
|
|
|
|
if (c == '\n' or c == '\r'): |
|
|
|
|
|
return c |
|
|
|
|
|
|
|
|
if (c == 10 or c == 13): |
|
|
|
|
|
return buf |
|
|
if (c > 31 and c < 127): |
|
|
if (c > 31 and c < 127): |
|
|
return c |
|
|
|
|
|
|
|
|
return buf |
|
|
else: |
|
|
else: |
|
|
return '' |
|
|
|
|
|
|
|
|
return b'' |
|
|
|
|
|
|
|
|
def read_firmware_file(file_path): |
|
|
def read_firmware_file(file_path): |
|
|
""" |
|
|
""" |
|
|