From 95a4faff3f684c6f6876d244ad556711c708396d Mon Sep 17 00:00:00 2001 From: ranchuan Date: Mon, 4 Dec 2023 11:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E5=9C=A8=E5=88=9D=E6=AC=A1=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E6=A3=80=E6=B5=8B=E5=91=BD=E4=BB=A4=E6=97=B6=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C=EF=BC=8C=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=BB=93=E6=9D=9F=E6=97=B6=E8=8E=B7=E5=8F=96=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=BB=93=E6=9E=9C=E5=8A=A0=E5=85=A5=E6=9C=89=E6=95=88?= =?UTF-8?q?=E6=80=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- checher_slave.uvoptx | 25 ++++--------------------- source/ReadMe.txt | 2 ++ source/elec_det/elec_det.c | 3 ++- source/elec_det/hardware/gpio_cfg.c | 3 ++- source/main/compiler_info.h | 4 ++-- source/prebuild.py | 2 +- source/rt_thread/rtconfig.h | 2 +- source/task/tran_for_slave.c | 11 ++++++++--- 8 files changed, 22 insertions(+), 30 deletions(-) diff --git a/checher_slave.uvoptx b/checher_slave.uvoptx index 0a3fb63..d65ac4a 100644 --- a/checher_slave.uvoptx +++ b/checher_slave.uvoptx @@ -377,24 +377,7 @@ - - - 0 - 0 - 159 - 1 -
134301518
- 0 - 0 - 0 - 0 - 0 - 1 - D:\work\SVN\鍐夊窛\mcu_program\checker_slave\source\soft\mystdlib.c - - \\checker_slave_app\source/soft/mystdlib.c\159 -
-
+ 0 @@ -406,15 +389,15 @@ 1 1 - 0x20002700 + 0x20001800 0 2 - 0 - 0x0803B000 + 1 + 0x200028C8 0 diff --git a/source/ReadMe.txt b/source/ReadMe.txt index 44bd31b..67ceff7 100644 --- a/source/ReadMe.txt +++ b/source/ReadMe.txt @@ -275,4 +275,6 @@ EJ工厂代码otp0地址校验 2023.12.1 地址线使用下拉,app中也使用断言,线程栈默认填充0x23+pro,malloc失败直接进断言 +2023.12.4 + 只在初次进入检测命令时清除检测结果,检测结束时获取检测结果加入有效性判断 diff --git a/source/elec_det/elec_det.c b/source/elec_det/elec_det.c index 188ef55..40750ce 100644 --- a/source/elec_det/elec_det.c +++ b/source/elec_det/elec_det.c @@ -543,6 +543,7 @@ array_def *elec_check_with_scheme(array_def *uid_psw) arr_append(r,2); return arr_temp(r); } + elec_check_result_clear(); LED1_Out_Off; while(s->task_indextask_num){ if(elec_check_load_task_param(s->task_index)){ @@ -585,7 +586,7 @@ array_def *elec_code(array_def *uid_psw) array_def *r=arr_creat(); uint8_t ret=0; int check_ret=0; - //CHECK_DO(s->data,arr_delete); + elec_check_result_clear(); check_ret=elec_code_param_check(uid_psw); if(check_ret!=0){ arr_append(r,1); diff --git a/source/elec_det/hardware/gpio_cfg.c b/source/elec_det/hardware/gpio_cfg.c index eda011a..759f308 100644 --- a/source/elec_det/hardware/gpio_cfg.c +++ b/source/elec_det/hardware/gpio_cfg.c @@ -24,7 +24,8 @@ void CtrlGpio_DefInit(void) GPIO_ResetBits(GPIOA,GPIO_InitStructure.GPIO_Pin); GPIO_InitStructure.GPIO_Pin = SEG0_Pin; - GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING; + //GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING; + GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IPD; GPIO_Init(GPIOA,&GPIO_InitStructure); diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index 9c635a2..843572d 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -6,8 +6,8 @@ -#define BUILD_DATE "2023-12-01 18:39:30" -#define SOFT_VERSION "2.06" +#define BUILD_DATE "2023-12-04 10:52:51" +#define SOFT_VERSION "2.07" diff --git a/source/prebuild.py b/source/prebuild.py index 6400efd..27b8d95 100644 --- a/source/prebuild.py +++ b/source/prebuild.py @@ -7,7 +7,7 @@ import mycopy # 定义软件版本号 -SOFT_VERION = "2.06" +SOFT_VERION = "2.07" diff --git a/source/rt_thread/rtconfig.h b/source/rt_thread/rtconfig.h index 9061d0b..b856f15 100644 --- a/source/rt_thread/rtconfig.h +++ b/source/rt_thread/rtconfig.h @@ -82,7 +82,7 @@ // The stack size of timer thread <0-8192> // Default: 512 -#define RT_TIMER_THREAD_STACK_SIZE 2048 +#define RT_TIMER_THREAD_STACK_SIZE 1024 // The soft-timer tick per second <0-1000> // Default: 100 diff --git a/source/task/tran_for_slave.c b/source/task/tran_for_slave.c index 58de8a0..cbc9760 100644 --- a/source/task/tran_for_slave.c +++ b/source/task/tran_for_slave.c @@ -163,8 +163,13 @@ static void check_submit_later(void *t) s->submit_times--; if(s->submit_running&&(s->submit_times>0)){ - emit tran_send_signal(s->tran,s->cmd,(elec_check_result())); - s->submit_delay+=elec_local_addr()*3; + array_def *ret=elec_check_result(); + if(ret!=0){ + emit tran_send_signal(s->tran,s->cmd,ret); + s->submit_delay+=elec_local_addr()*3; + }else{ + //while(1); + } later_execute(check_submit_later,s,s->submit_delay); }else{ s->submit_running=0; @@ -198,13 +203,13 @@ static int check_dolater(ucport_def *u,uint8_t cmd,array_def *data,char *err_str c->tran=s->u.p; check_set_data(c,data); later_execute(check_later,c,10); + elec_check_result_clear(); } if(c->cmd==cmd){ arr_append(r,0); }else{ arr_append(r,2); } - elec_check_result_clear(); if(c->cmd==cmd){ emit tran_reply_signal(u->p,arr_temp(r)); }else{