规避下载固件时可能识别不到标志字符串的风险

This commit is contained in:
ranchuan
2025-03-03 11:30:26 +08:00
parent a5a514b752
commit e1fbee6ef1

View File

@@ -75,8 +75,7 @@ def burn_flash_bin(s_port:serial.Serial, x_modem:xmodem.XMODEM, f_file):
continue continue
print_device_str(tmp) print_device_str(tmp)
s_info += tmp s_info += tmp
# if(s_info.find(b'CCC')>=0 and bytes2read==1): if(s_info.find(b'CCC')>=0 and bytes2read==1) or (s_info.find(b'Recieving FLASH-IMAGE in xmodem : C')>=0):
if(s_info.find(b'Recieving FLASH-IMAGE in xmodem : C')>=0):
m_flash=True m_flash=True
else: else:
m_flash=False m_flash=False