From 976fca8449b9fee3092903472c89a41b84eaa312 Mon Sep 17 00:00:00 2001 From: qiuyao <qiuyao@hnkhzn.com> Date: 星期五, 28 二月 2025 16:30:38 +0800 Subject: [PATCH] 修改命名空间 --- 项目代码/WIDESEAWCS_Server 正式/WIDESEAWCS_Tasks/SerialPort/SerialPortTestJob.cs | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Tasks/SerialPort/SerialPortTestJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Tasks/SerialPort/SerialPortTestJob.cs" index abc1750..352f942 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Tasks/SerialPort/SerialPortTestJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server \346\255\243\345\274\217/WIDESEAWCS_Tasks/SerialPort/SerialPortTestJob.cs" @@ -9,7 +9,6 @@ { public class SerialPortTestJob:IJob { - // 鍦� SerialPortTestService 绫讳腑娣诲姞瀵� ISerialPortService 鐨勫紩鐢� private readonly ISerialPortService _serialPortService; public readonly string _port; @@ -23,17 +22,13 @@ SerialPort = new SerialPort(_port); - - //涓插彛鎺ユ敹鍒版暟鎹椂锛孲erialPort 浼氳嚜鍔ㄨЕ鍙� DataReceived 浜嬩欢 //SerialPort.DataReceived += OnDataReceived; //鎺ユ敹涓插彛鍙戝嚭鐨勬暟鎹� } private CancellationTokenSource _cancellationTokenSource; private Task _sendTask; - private int commandType = 2; - - + private int commandType = 2; // 鍛戒护瀛楃涓� private string command0 = ""; // 涓嶅彂閫佸懡浠� @@ -43,7 +38,7 @@ public Task Execute(IJobExecutionContext context) { - OpenSerialPort(); + //OpenSerialPort(); SerialPort.DataReceived += OnDataReceived; return Task.CompletedTask; -- Gitblit v1.9.3