添加赋码设备注码命令,实现ew检测时注码

This commit is contained in:
ranchuan
2023-12-19 18:21:28 +08:00
parent 58c902a94f
commit ddf40324f7
14 changed files with 269 additions and 384 deletions

View File

@@ -69,8 +69,12 @@ static int coder_calc_year(const char *year,const char shell_year,char *uid_year
}
// year是实时数据鉴于12月31生产的雷管year可能不同
// 此时year-1来保证与uid码上的相同
if(year[3]!=shell_year)
y--;
for(int i=0;i<10;i++){
if((y%10)!=(shell_year-'0'))
y--;
else
break;
}
uid_year[0]=y%100/10+'0';
uid_year[1]=y%10+'0';
if(uid_year[1]==shell_year)