添加小板程序版本读取

This commit is contained in:
ranchuan
2024-03-12 17:04:07 +08:00
parent 5aa013e168
commit 5bd29dd25d
11 changed files with 164 additions and 26 deletions

View File

@@ -95,12 +95,13 @@ def _detail_lua(name:str):
ret=[" |文件类型:批检仪/赋码仪检测结果判定脚本"]
return ret
def _detail_pkt(name:str):
ret=[" |文件类型:MCU程序在线升级文件"]
ret=[" |文件类型:批检仪/赋码仪小板程序在线升级文件"]
with open(name,"rb") as f:
data=f.read()
ret.append(" |打包时间:{d}".format(d=_bytes_to_str(data[4:4+20])))
ret.append(" |主机接口:{d}".format(d=_bytes_to_str(data[40:40+8])))
ret.append(" |设备类型:{d}".format(d=_bytes_to_str(data[48:48+12])))
ret.append(" |软件版本:{d}".format(d=_bytes_to_str(data[60:60+12])))
return ret
def _detail_py(name:str):

View File

@@ -318,7 +318,6 @@ class handle:
class protu(QObject):
# 进度信号ip1~100
rate_signal =pyqtSignal([int])
@@ -552,12 +551,15 @@ def int2str(num:int):
return s
ddd=0
if __name__ == "__main__":
u=protu()
# u.init("utcp:7777")
# u.send_file(0xee,"file/JQ_JCXB_V54.bin")
# u.send_file(0xed,"../Objects/checker_gen1_app_20230602.bin")
ddd+=1
# 设置电阻 矫正值
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])

View File

@@ -321,10 +321,10 @@ if __name__ == "__main__":
u=pt.protu()
# 检测并写入流水号
# data=coder_check_write_sn(0,12345)
data=coder_check_write_sn(0,12345)
# 检测并读取工厂信息和延时
data=coder_check_read_fatinfo(0)
# data=coder_check_read_fatinfo(0)
# data=bytearray.fromhex("0d 00 00 0d 01 1f 0a 01 18 02 0a 05 01 14 00 04 00")
u.cmd=0x21