解决updata 关闭时串口没有正常关闭的问题
修改服务器文件列表显示 添加.jwt文件解析
This commit is contained in:
@@ -101,13 +101,22 @@ def _detail_pkt(name:str):
|
||||
ret.append(" |主机接口:{d}".format(d=_bytes_to_str(data[40:40+8])))
|
||||
ret.append(" |设备类型:{d}".format(d=_bytes_to_str(data[48:48+12])))
|
||||
return ret
|
||||
|
||||
def _detail_py(name:str):
|
||||
return ["暂未实现"]
|
||||
def _detail_service(name:str):
|
||||
return ["暂未实现"]
|
||||
def _detail_dtb(name:str):
|
||||
return ["暂未实现"]
|
||||
|
||||
def _detail_jwt(name:str):
|
||||
ret=[" |文件类型:杰华特电子模块芯片程序"]
|
||||
with open(name,"rb") as f:
|
||||
data=f.read()
|
||||
data=data[16*1024:]
|
||||
ret.append(" |全固件CRC32:{d}".format(d=hex(_bytes_to_int(data[0:4]))))
|
||||
ret.append(" |APP部分CRC32:{d}".format(d=hex(_bytes_to_int(data[4:8]))))
|
||||
ret.append(" |文件名称:{d}".format(d=_bytes_to_str(data[8:])))
|
||||
return ret
|
||||
|
||||
_fun_table={
|
||||
".elf":_detail_elf,
|
||||
@@ -119,7 +128,8 @@ _fun_table={
|
||||
".pkt":_detail_pkt,
|
||||
".py":_detail_py,
|
||||
".service":_detail_service,
|
||||
".dtb":_detail_dtb
|
||||
".dtb":_detail_dtb,
|
||||
".jwt":_detail_jwt
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user