解决注码成功返回0xc0的问题
This commit is contained in:
@@ -4,6 +4,7 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import socket
|
import socket
|
||||||
import checker_save
|
import checker_save
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,7 +3,8 @@ import serial.tools.list_ports
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import socket
|
import socket
|
||||||
import checker_save
|
import sys
|
||||||
|
# import checker_save
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -181,7 +182,7 @@ class port:
|
|||||||
def checker_test(self,times:int,scheme:str,script:str):
|
def checker_test(self,times:int,scheme:str,script:str):
|
||||||
print("批检仪测试:")
|
print("批检仪测试:")
|
||||||
tick=0
|
tick=0
|
||||||
save=checker_save.save(scheme,script)
|
# save=checker_save.save(scheme,script)
|
||||||
data=bytearray()
|
data=bytearray()
|
||||||
while(tick<times):
|
while(tick<times):
|
||||||
tick+=1
|
tick+=1
|
||||||
@@ -218,9 +219,15 @@ class port:
|
|||||||
print("检测耗时:",end-start)
|
print("检测耗时:",end-start)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
if(len(sys.argv)<3):
|
||||||
|
print("argv num too less")
|
||||||
|
print("请输入批检仪串口号,赋码仪串口号")
|
||||||
|
checker_port=sys.argv[1]
|
||||||
|
coder_port=sys.argv[2]
|
||||||
|
|
||||||
p=port()
|
p=port()
|
||||||
# 批检仪测试
|
# 批检仪测试
|
||||||
p.open("com5",57600)
|
p.open(checker_port,57600)
|
||||||
p.open_code("com8",115200)
|
p.open_code(coder_port,115200)
|
||||||
# p.open("utcp",9527)
|
# p.open("utcp",9527)
|
||||||
p.checker_test(5000,"file/EX_Coder_Test_2023-07-4.json","file/judge-xt.lua")
|
p.checker_test(5000,"file/EX_Coder_Test_2023-07-4.json","file/judge-xt.lua")
|
||||||
|
@@ -146,4 +146,6 @@
|
|||||||
上报指令流水号自增
|
上报指令流水号自增
|
||||||
不进行流水号重复判断
|
不进行流水号重复判断
|
||||||
2023.8.4
|
2023.8.4
|
||||||
添加注码错误偏移
|
添加注码错误偏移
|
||||||
|
2023.8.9
|
||||||
|
解决注码成功返回0xc0的问题
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BUILD_DATE "2023-08-04 10:50:52"
|
#define BUILD_DATE "2023-08-09 13:54:50"
|
||||||
#define SOFT_VERSION "0.10"
|
#define SOFT_VERSION "0.10"
|
||||||
|
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@ static int updata_slave(list_def *argv)
|
|||||||
data+=FLASH_FILE_HEAD_SIZE;
|
data+=FLASH_FILE_HEAD_SIZE;
|
||||||
flash_file *file=ptr;
|
flash_file *file=ptr;
|
||||||
if(tran==0){
|
if(tran==0){
|
||||||
DBG_WARN("can not fond variable \"tran\"");
|
DBG_WARN("can not find variable \"tran\"");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(list_length(argv)<2){
|
if(list_length(argv)<2){
|
||||||
|
@@ -90,7 +90,7 @@ static void write_uid_fillret(write_uid_def *w,int addr,int ack)
|
|||||||
uint8_t *d=&w->ack[(addr)*39];
|
uint8_t *d=&w->ack[(addr)*39];
|
||||||
w->ack_num++;
|
w->ack_num++;
|
||||||
d[0]=addr+slave_addr_off();
|
d[0]=addr+slave_addr_off();
|
||||||
d[1]=(ack==0xff)?0xff:(ack+0xc0);
|
d[1]=((ack==0xff)||(ack==0x00))?ack:(ack+0xc0);
|
||||||
memcpy(&d[2],w->item[addr].shell_code,13);
|
memcpy(&d[2],w->item[addr].shell_code,13);
|
||||||
memcpy(&d[2+13],w->item[addr].uid_code,16);
|
memcpy(&d[2+13],w->item[addr].uid_code,16);
|
||||||
memcpy(&d[2+13+16],w->item[addr].password,8);
|
memcpy(&d[2+13+16],w->item[addr].password,8);
|
||||||
|
Reference in New Issue
Block a user