diff --git a/checher_slave.uvoptx b/checher_slave.uvoptx index e6a6e8b..356c77d 100644 --- a/checher_slave.uvoptx +++ b/checher_slave.uvoptx @@ -299,7 +299,7 @@ 1 0 - 0 + 1 18 @@ -377,24 +377,7 @@ - - - 0 - 0 - 185 - 1 -
134234652
- 0 - 0 - 0 - 0 - 0 - 1 - .\source\rt_thread\libcpu\arm\cortex-m3\context_rvds.S - - \\checker_slave_app\source/rt_thread/libcpu/arm/cortex-m3/context_rvds.S\185 -
-
+ 0 @@ -540,7 +523,7 @@ 1 0 - 1 + 0 18 diff --git a/source/ReadMe.txt b/source/ReadMe.txt index 741c9d9..7a24781 100644 --- a/source/ReadMe.txt +++ b/source/ReadMe.txt @@ -322,3 +322,5 @@ EW_Updata 添加错误12表示小板中无jwt程序 2024.01.03 V2.11 读流水号时如果目标值为0则不报错 +2021.01.04 + V2.12 sn为0时如果未写流水号则报错 diff --git a/source/elec_det/hardware/gpio_cfg.c b/source/elec_det/hardware/gpio_cfg.c index 759f308..c924d81 100644 --- a/source/elec_det/hardware/gpio_cfg.c +++ b/source/elec_det/hardware/gpio_cfg.c @@ -24,7 +24,7 @@ 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); @@ -91,7 +91,7 @@ uint8_t Gpio_GetDeivceAddr(void) ul_addr |= ((PCin(SEG1_Pin_Nu) & 0x01) <<1); ul_addr |= (PAin(SEG0_Pin_Nu) & 0x01); return ul_addr; -// return 1; +// return 7; } diff --git a/source/elec_det/interface/EWChecker.c b/source/elec_det/interface/EWChecker.c index 2ec55fe..c6e7041 100644 --- a/source/elec_det/interface/EWChecker.c +++ b/source/elec_det/interface/EWChecker.c @@ -1049,6 +1049,12 @@ void EW_Test_ReadSN(void) temp.data>>=5; if((sn!=0)&&(temp.data!=sn)){ uc_rtv=3; + goto end; + } + // sn为0时如果没写过流水号则失败 + if((sn==0)&&(temp.data==0)){ + uc_rtv=4; + goto end; } end: Checker_SetRtv((uint16_t *)&temp,checker_runcfg.rtv_count); @@ -1081,11 +1087,18 @@ void EW_Test_WriteSN(void) uc_rtv=2; goto end; } + // 流水号域如果有值且不为要设置的流水号则失败 + if((temp.data&(~0x1f))!=0){ + if((temp.data>>5)!=sn){ + uc_rtv=3; + } + goto end; + } delay_ms(50); temp.data=(temp.data&0x1f)|(sn<<5); uc_rtv |= EW_WriteMTP(checker_runcfg.netid,addr,temp.arr,len); if(uc_rtv){ - uc_rtv=3; + uc_rtv=4; goto end; } end: diff --git a/source/elec_det/interface/JQChecker.c b/source/elec_det/interface/JQChecker.c index 8fc25fd..1848126 100644 --- a/source/elec_det/interface/JQChecker.c +++ b/source/elec_det/interface/JQChecker.c @@ -1326,6 +1326,12 @@ void JQ_Test_ReadSN(void) temp.data>>=5; if((sn!=0)&&(temp.data!=sn)){ uc_rtv=3; + goto end; + } + // sn为0时如果没写过流水号则失败 + if((sn==0)&&(temp.data==0)){ + uc_rtv=4; + goto end; } end: diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index ebed374..fca8e2a 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -6,8 +6,8 @@ -#define BUILD_DATE "2024-01-03 15:32:33" -#define SOFT_VERSION "2.11" +#define BUILD_DATE "2024-01-04 14:39:32" +#define SOFT_VERSION "2.12" diff --git a/source/prebuild.py b/source/prebuild.py index 9ffad8b..8ea4956 100644 --- a/source/prebuild.py +++ b/source/prebuild.py @@ -7,7 +7,7 @@ import mycopy # 定义软件版本号 -SOFT_VERION = "2.11" +SOFT_VERION = "2.12"