优化提交

This commit is contained in:
2025-04-22 15:33:38 +08:00
parent 555ce4c4fb
commit e253d0c52c
3 changed files with 4 additions and 4 deletions

View File

@@ -224,7 +224,7 @@ namespace linesider_screen_tool
bool allSuccess = true; bool allSuccess = true;
// 遍历所有标签数据并打印 // 遍历所有标签字典数据并打印
foreach (var subStringValues in batchSubStringValues) foreach (var subStringValues in batchSubStringValues)
{ {
try try

View File

@@ -26,8 +26,8 @@ namespace linesider_screen_tool
/// <summary> /// <summary>
/// 初始化 MQTT 客户端 /// 初始化 MQTT 客户端
/// </summary> /// </summary>
public MQTTHepler(string server, int port = 1883, string clientId = null, public MQTTHepler(string server, int port = 1883, string clientId = "demo_test001",
string username = null, string password = null, bool cleanSession = true) string username = "admin", string password = "public123", bool cleanSession = true)
{ {
_server = server; _server = server;
_port = port; _port = port;

View File

@@ -12,7 +12,7 @@ namespace linesider_screen_tool
{ {
public class SerialPortHepler:IDisposable public class SerialPortHepler:IDisposable
{ {
private SerialPort _serialPort; private SerialPort? _serialPort;
// 内部缓冲区用于存储接收到的数据 // 内部缓冲区用于存储接收到的数据
private StringBuilder receiveBuffer = new StringBuilder(); private StringBuilder receiveBuffer = new StringBuilder();
public event Action<string> DataReceived; public event Action<string> DataReceived;