添加环境依赖配置;
添加测试用例生成;
This commit is contained in:
@@ -10,7 +10,7 @@ from tools.IntelHex import file_Bin_to_IntelHex
|
||||
from func_frame import make_frame_modbus, check_frame_modbus, print_display
|
||||
from func_upgrade import GenerateImage_DLSP001_p280039, GeneratePackage_DLSP001_p280039
|
||||
|
||||
modbus_map = {
|
||||
ParamMap_LaminaController = {
|
||||
# 1 - Hex
|
||||
# 2 - Int16
|
||||
# 3 - lnt32
|
||||
@@ -138,7 +138,7 @@ class LaminaController:
|
||||
'type' : 'modbus',
|
||||
'data' : {
|
||||
'addr_dev' : addr_modbus,
|
||||
'data_define': modbus_map,
|
||||
'data_define': ParamMap_LaminaController,
|
||||
},
|
||||
}
|
||||
self.output = {
|
||||
@@ -693,7 +693,7 @@ if __name__=='__main__':
|
||||
"Log": {'com_name': None,
|
||||
# 'addr_645': [0x01, 0x00, 0x00, 0x00, 0x00, 0x40],
|
||||
},
|
||||
"Debug": {'com_name': 'COM3', 'baudrate': 115200, 'parity': 'N', 'bytesize': 8, 'stopbits': 1,
|
||||
"Debug": {'com_name': 'COM5', 'baudrate': 115200, 'parity': 'N', 'bytesize': 8, 'stopbits': 1,
|
||||
# 'addr_645': [0x01, 0x02, 0x03, 0x04, 0x05, 0x06],
|
||||
'frame_print': True,
|
||||
'time_out': 0.5, 'retry': 3},
|
||||
@@ -719,14 +719,12 @@ if __name__=='__main__':
|
||||
""" 升级流程 """
|
||||
path_project = Path("D:\WorkingProject\LightStackOptimizer\software\lamina_controller_dsp\lamina_controller_dsp")
|
||||
file_hex = path_project / "DEBUG\lamina_controller_dsp.hex"
|
||||
# file_hex = Path(r"C:\Users\wrqal\Documents\WXWork\1688856624403708\Cache\File\2024-09\lamina_controller_dsp(1).hex")
|
||||
if not file_hex.exists():
|
||||
raise Exception("工程编译目标文件不存在.")
|
||||
file_package = make_Pakeage(file_hex)
|
||||
|
||||
dev_lamina.frame_write_one(0x60, 0)
|
||||
time.sleep(1)
|
||||
if dev_lamina.frame_update(file_package):
|
||||
if dev_lamina.frame_update(file_hex, makefile=True):
|
||||
time.sleep(6)
|
||||
dev_lamina.frame_read(0x0100, 0x20)
|
||||
# dev_lamina.frame_write_one(0x52, 0x01)
|
||||
|
||||
Reference in New Issue
Block a user