修改updata工具按钮描述

This commit is contained in:
ranchuan
2023-10-27 18:50:17 +08:00
parent a866e93ad7
commit ca66d05f2d
4 changed files with 42 additions and 29 deletions

View File

@@ -130,12 +130,12 @@ def main():
print("串口号为:{d1} ,运行次数为:{d2}".format(d1=com,d2=count))
# 检测赋码仪系统测试
# p.open(com,115200)
# p.ecode_test(count)
p.open(com,115200)
p.ecode_test(count)
# 赋码仪设备串口测试
p.open(com,115200)
p.coder_test(count)
# p.open(com,115200)
# p.coder_test(count)
# 赋码仪设备网口测试
# p.open("utcp",0)

View File

@@ -480,8 +480,8 @@ if __name__ == "__main__":
# u.send_file(0xed,"../Objects/checker_gen1_app_20230602.bin")
# 设置电阻 矫正值
u.cmd=0x41
data=bytearray([1,0,0x00,2,0,0x00,3,0,0x00,4,0,0x00,5,0,0x00,6,0,0x00,7,0,0x00,8,0,0x00,9,0,0x00,10,0,0x00,11,0,0x00,12,0,0x00,13,0,0x00,14,0,0x00,15,0,0x00,16,0,0x00,17,0,0x00,18,0,0x00,19,0,0x00,20,0,0x00])
# u.cmd=0x41
# data=bytearray([1,0,0x00,2,0,0x00,3,0,0x00,4,0,0x00,5,0,0x00,6,0,0x00,7,0,0x00,8,0,0x00,9,0,0x00,10,0,0x00,11,0,0x00,12,0,0x00,13,0,0x00,14,0,0x00,15,0,0x00,16,0,0x00,17,0,0x00,18,0,0x00,19,0,0x00,20,0,0x00])
# 测量电阻
# u.cmd=0x42
# data=bytearray([0])
@@ -494,7 +494,7 @@ if __name__ == "__main__":
# data=bytearray([0x02]) # 上升
# data=bytearray([0x03]) # 下降
print(u.encode(data).hex(' '))
# print(u.encode(data).hex(' '))
# with open("file/EX_Coder_Test_2023-07-6.json","rb") as f:
# json_obj=json.loads(f.read())
# d=scheme_to_byte(json_obj)
@@ -510,6 +510,16 @@ if __name__ == "__main__":
# p=u.encode(f.read())
# print(p.hex(' '))
u.init("utcp:9527")
u.send(0x42,bytearray([0]))
d=u.ser.read(500)
d=u.decode(d)
print(d.hex(' '))
def slave_res(d:bytearray):
for i in range(len(d)//3):
print("slave:{addr},{res}".format(addr=d[3*i],res=(d[3*i+1])|(d[3*i+2]<<8)))
slave_res(d[1:])
# 开始检测
# 59 6d 03 00 30 00 00 60 0f