From 03ec0d8764b85965ce66c28191d96f31ce926ad8 Mon Sep 17 00:00:00 2001 From: jlk Date: Thu, 29 Aug 2024 15:40:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0led=E7=81=AF=E6=8E=A7?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElinsF103/Core/Src/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ElinsF103/Core/Src/main.c b/ElinsF103/Core/Src/main.c index 9bfb0c9..6bdd347 100644 --- a/ElinsF103/Core/Src/main.c +++ b/ElinsF103/Core/Src/main.c @@ -146,6 +146,11 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { UartModbusStruct.rxd_overT--; if(UartModbusStruct.rxd_overT==0) { + if(UartModbusStruct.ModbusRecBuff[0]==0)//UartModbusStruct.ModbusRecPtr<5) + HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); + else + HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET); //指示灯闪烁 + if(ModbusCommand==1){ //有效数据 if(UartModbusStruct.ModbusRecBuff[0]&0x10){ //设置can参数 if(UartModbusStruct.ModbusRecPtr>1){ -- Gitee From 937dc750059864f4309c30be179308acfb834465 Mon Sep 17 00:00:00 2001 From: jlk Date: Fri, 30 Aug 2024 17:20:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=B3=E6=8E=89zhiexe=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=89=BE=E4=B8=8D=E5=88=B0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhiDE/code/Form1.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zhiDE/code/Form1.cs b/zhiDE/code/Form1.cs index 4962dd9..b6ff961 100644 --- a/zhiDE/code/Form1.cs +++ b/zhiDE/code/Form1.cs @@ -228,13 +228,13 @@ namespace zhiDebugEvn { private void Form1_Load(object sender, EventArgs e) { EmbeddedExeTool exetool = new EmbeddedExeTool(); //WindowsFormsApp4.exe 涓鸿宓屽叆澶栭儴exe鐨勫叿浣撹矾寰 - if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe")) + /*if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe")) exetool.LoadEXE(panel1, AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe");//debug涓嬮潰鐨勬枃浠跺す else MessageBox.Show("璋冭瘯杞欢zhidbg.exe涓嶅瓨鍦紝璇风‘璁" + AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe"); if (zhiHandle != IntPtr.Zero) { PostMessage(zhiHandle, WM_SYSCOMMAND, 0xF020, 0); //鏈灏忓寲 - } + }*/ } @@ -514,11 +514,11 @@ namespace zhiDebugEvn { void startUdpReceive() { // Console.WriteLine("------startUdpReceive--"); - udpServer = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + /* udpServer = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); udpServer.Bind(new IPEndPoint(IPAddress.Any, 9001)); new Thread(ReceiveMessage) { IsBackground = true - }.Start(); + }.Start();*/ } @@ -583,14 +583,14 @@ namespace zhiDebugEvn { } } else { EmbeddedExeTool exetool = new EmbeddedExeTool(); - //WindowsFormsApp4.exe 涓鸿宓屽叆澶栭儴exe鐨勫叿浣撹矾寰 + /* //WindowsFormsApp4.exe 涓鸿宓屽叆澶栭儴exe鐨勫叿浣撹矾寰 if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe")) exetool.LoadEXE(panel1, AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe");//debug涓嬮潰鐨勬枃浠跺す else MessageBox.Show("璋冭瘯杞欢zhidbg.exe涓嶅瓨鍦紝璇风‘璁" + AppDomain.CurrentDomain.BaseDirectory + "tools\\zhidbg.exe"); if (zhiHandle != IntPtr.Zero) { PostMessage(zhiHandle, WM_SYSCOMMAND, 0xF020, 0); //鏈灏忓寲 - } + }*/ } } else if (zhiHandle != IntPtr.Zero) { PostMessage(zhiHandle, WM_SYSCOMMAND, 0xF020, 0); //鏈灏忓寲 -- Gitee