From 58f4bde2b183ece4399dd1a0a441d8c06abfd641 Mon Sep 17 00:00:00 2001 From: kyz Date: Thu, 9 May 2024 17:38:36 +0800 Subject: [PATCH] =?utf8?q?v2.11=20=20=E6=97=81=E8=B7=AF=E7=9B=B4=E9=80=9A?= =?utf8?q?=E7=8A=B6=E6=80=81=E5=A2=9E=E5=8A=A0=E7=84=8A=E6=8E=A5=E7=8A=B6?= =?utf8?q?=E6=80=81=E4=BE=A6=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- user/user.h | 2 +- user/user_valve_ctrl.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/user/user.h b/user/user.h index d56a918..6bd9720 100644 --- a/user/user.h +++ b/user/user.h @@ -34,7 +34,7 @@ #define APP_VER_MAJOR 2 -#define APP_VER_MINOR 10 +#define APP_VER_MINOR 11 #define DEVICE_SN_DEFAULT "A" "02" "01" "240506" "000001" #define DEVICE_SN_SIZE 17 diff --git a/user/user_valve_ctrl.c b/user/user_valve_ctrl.c index 48a8b2a..8809faa 100644 --- a/user/user_valve_ctrl.c +++ b/user/user_valve_ctrl.c @@ -530,6 +530,22 @@ void user_valve_ctrl_task( void* unused ) //比例阀温度故障 valve_bypass( 1 ); //旁路电磁阀开启 g_dev.valve_curr_out = 0; //比例电磁阀关闭 + + //旁路时也更新焊接状态,修复旁路时上报平台为未焊接状态的问题 2024/5/9 + if( g_dev.cfg.remote_locked || welding_current < 10.0f ){ //焊接电流大于10A 认为开始焊接,小于10A认为焊接停止。 + //未开始焊接 + if( g_dev.welding_start == 1 ){ + g_dev.welding_start = 0; + g_dev.welding_time = 0; + } + }else{ + if( g_dev.welding_start == 0 ){ + //焊接启动 + g_dev.welding_start = 1; + g_dev.welding_time = 0; + } + } + }else{ valve_bypass( 0 ); //旁路电磁阀关闭 //检查焊接电流,判断是否开始焊接 -- 2.34.1