修改了发送 QtextEdit 中回车为\n的问题
This commit is contained in:
parent
9f1a80364d
commit
0c6b92830f
Binary file not shown.
@ -6,7 +6,7 @@ Created on Mon May 27 14:31:38 2024
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import serial
|
import serial,re
|
||||||
import serial.tools.list_ports
|
import serial.tools.list_ports
|
||||||
import time,datetime
|
import time,datetime
|
||||||
|
|
||||||
@ -342,6 +342,7 @@ class PyQt5Serial(QtWidgets.QWidget,Ui_UartAssistant):
|
|||||||
# ASCII发送
|
# ASCII发送
|
||||||
else:
|
else:
|
||||||
input_s = (input_s).encode('utf-8')
|
input_s = (input_s).encode('utf-8')
|
||||||
|
input_s = re.sub(b'(?<!\r)\n', b'\r\n', input_s)
|
||||||
|
|
||||||
# HEX接收显示
|
# HEX接收显示
|
||||||
if self.checkBoxHexReceive.isChecked():
|
if self.checkBoxHexReceive.isChecked():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user