From bf440a35bc7dc16fde8dd2cfdccd48e3098bb48f Mon Sep 17 00:00:00 2001 From: ranchuan Date: Wed, 20 Sep 2023 18:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20=E5=8F=96=E6=B6=88=E6=80=A5?= =?UTF-8?q?=E5=81=9C=E6=97=B6=E5=A6=82=E6=9E=9C=E4=B8=8D=E5=9C=A8=E7=A9=BA?= =?UTF-8?q?=E9=97=B2=E7=8A=B6=E6=80=81=E6=89=8D=E8=B7=B3=E5=88=B0=E5=8F=A6?= =?UTF-8?q?=E4=B8=80=E4=BE=A7=20=20=20=20=20=E5=BF=83=E8=B7=B3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=9C=A8=E6=94=B6=E5=88=B0=E5=9B=9E=E5=A4=8D=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E4=B9=9F=E4=BC=9A=E7=BB=A7=E7=BB=AD=E5=8F=91=E9=80=81?= =?UTF-8?q?=20=20=20=20=20=E8=8A=AF=E7=89=87=E5=BC=82=E5=B8=B8=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E6=A3=80=E6=B5=8B=E7=94=B5=E5=AE=B9=20=20=20=20=20str?= =?UTF-8?q?=5Fis=5Fprint=5Fstr=20=E5=87=BD=E6=95=B0=E4=B8=AD=EF=BC=8Clen?= =?UTF-8?q?=E4=B8=BA0=E6=97=B6=E8=BF=94=E5=9B=9E0=20=20=20=20=20=E6=94=B9?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=BA0.03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coder_2channel.uvoptx | 2 +- coder_2channel.uvprojx | 2 +- source/ReadMe.txt | 5 +++++ source/coder/coder_judge.c | 16 ++++++++++++++++ source/main/compiler_info.h | 4 ++-- source/prebuild.py | 2 +- source/soft/mystring.c | 3 +++ source/task/process.c | 23 ++++++++++++++++++++--- source/task/tran_for_coder2ch.c | 6 +++--- 9 files changed, 52 insertions(+), 11 deletions(-) diff --git a/coder_2channel.uvoptx b/coder_2channel.uvoptx index 07718fa..d0daa00 100644 --- a/coder_2channel.uvoptx +++ b/coder_2channel.uvoptx @@ -971,7 +971,7 @@ rt_thread - 1 + 0 0 0 0 diff --git a/coder_2channel.uvprojx b/coder_2channel.uvprojx index 3c01df5..3c1a6d4 100644 --- a/coder_2channel.uvprojx +++ b/coder_2channel.uvprojx @@ -138,7 +138,7 @@ 1 BIN\UL2CM3.DLL - + "" () diff --git a/source/ReadMe.txt b/source/ReadMe.txt index 610973b..33258f4 100644 --- a/source/ReadMe.txt +++ b/source/ReadMe.txt @@ -172,6 +172,11 @@ 设置异常报警翻转次数,在次数不为0是只刷新次数不再设置回调 急停时管壳挡板设为0(挡住管壳) 解除急停时解除忙状态 +2023.9.20 + 取消急停时如果不在空闲状态才跳到另一侧 + 心跳数据在收到回复之后也会继续发送 + 芯片异常时不检测电容 + str_is_print_str 函数中,len为0时返回0 \ No newline at end of file diff --git a/source/coder/coder_judge.c b/source/coder/coder_judge.c index 83a0dd7..8b09377 100644 --- a/source/coder/coder_judge.c +++ b/source/coder/coder_judge.c @@ -280,6 +280,10 @@ uint8_t coder_judge_jq(const uint8_t *data) return 8; } + // 芯片异常时直接报芯片异常 + if(chip_err) + return chip_err; + // 检测电容 TASK_FIND_NEXT(11); temp=TASK_DATA(1); @@ -293,6 +297,18 @@ uint8_t coder_judge_jq(const uint8_t *data) return 2; } + // 检测桥丝 +// TASK_FIND_NEXT(11); +// temp=TASK_DATA(1); +// if(get_ack(data,index)){ +// return 4; +// } +// if((temp>task->range[1].max)||(temprange[1].min)) +// { +// return 4; +// } + + return chip_err; } diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index a08c133..c1b5fc1 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -6,8 +6,8 @@ -#define BUILD_DATE "2023-09-15 10:12:28" -#define SOFT_VERSION "0.01" +#define BUILD_DATE "2023-09-20 17:48:39" +#define SOFT_VERSION "0.03" diff --git a/source/prebuild.py b/source/prebuild.py index 8e7fd2b..b8963b3 100644 --- a/source/prebuild.py +++ b/source/prebuild.py @@ -7,7 +7,7 @@ from datetime import datetime, timedelta # 定义软件版本号 -SOFT_VERION = "0.01" +SOFT_VERION = "0.03" diff --git a/source/soft/mystring.c b/source/soft/mystring.c index da63f8b..108bad5 100644 --- a/source/soft/mystring.c +++ b/source/soft/mystring.c @@ -252,6 +252,9 @@ static inline int str_is_empty_char(char c) */ int str_is_print_str(const char *str,int len) { + if(len==0){ + return 0; + } for(int i=0;istop_state=0; s->busy=0; SET_LED_OFF(); + // 不在空闲状态时跳转到另一侧 + if(CHECK_STEP(s->step,idle)==0){ + RESET_STEP(s->step); + } + process_send_errstr(s,9,"取消急停"); DBG_LOG("stop key unpressed."); } @@ -389,11 +405,13 @@ static void process_end_slot(void *obj,int ack,array_def *data) // 400ms 后开始打标 void process_mark_start(void *arg); - later_execute(process_mark_start,s,400); + later_execute(process_mark_start,s,300); // 5s 后打标结束 void process_mark_end(void *arg); - later_execute(process_mark_end,s,5000); + later_execute(process_mark_end,s,2300); + + process_send_errstr(s,10,"开始打标"); } @@ -403,7 +421,6 @@ static void process_mark_start(void *arg) { self_def *s=arg; SAFE_CHECK(s); - SET_OUTPUT(OUTPUT_MARK,1); DBG_LOG("mark start."); } diff --git a/source/task/tran_for_coder2ch.c b/source/task/tran_for_coder2ch.c index 413f028..8ca45a4 100644 --- a/source/task/tran_for_coder2ch.c +++ b/source/task/tran_for_coder2ch.c @@ -334,8 +334,8 @@ static void live_recv(live_keeper_def *t) rt_tick_t tick=0; tick=rt_tick_from_millisecond(5000); rt_timer_control(t->timer,RT_TIMER_CTRL_SET_TIME,&tick); - //rt_timer_start(t->timer); - rt_timer_stop(t->timer); + rt_timer_start(t->timer); + //rt_timer_stop(t->timer); } @@ -349,7 +349,7 @@ static void live_send(void *p) if(t){ slave_online=tran_get_slave_online(t); } - protu_codec_set(live->protu,protu_find_codec("ym_checker")); + //protu_codec_set(live->protu,protu_find_codec("ym_checker")); array_def *d=arr_creat(); arr_append(d,coder_extract_chip(0));// 模块类型