COMTool icon indicating copy to clipboard operation
COMTool copied to clipboard

低波特率下解码UTF-8错误

Open XuanTongYao opened this issue 1 year ago • 1 comments

在低波特率(例如2400Hz)的情况下解码多字节编码文本,比如UTF-8会发生错误

image image

图中选中部分的16进制数据解码的文本应该为下载:0x56,启动:0xF1\n

逻辑分析仪采样数据显示时序都是正常的 image

我个人猜测你们使用了asyncio.sleep()或者定时器之类的东西把字节流切片后再解码,然后切片的时序出错导致解码出现错误。

XuanTongYao avatar Dec 31 '24 10:12 XuanTongYao

可能是这里 https://github.com/Neutree/COMTool/blob/2a958d8e4c440043867e22e3940d4e1ccf2858cb/COMTool/conn/conn_serial.py#L450-L452 maybe,没用过这么低的波特率过

Neutree avatar Jan 01 '25 05:01 Neutree