积累修改;
This commit is contained in:
@@ -2,7 +2,7 @@ import time
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from tenacity import retry, stop_after_attempt, wait_fixed
|
||||
from device.LaminaController import LaminaController
|
||||
from device.LaminaController import LaminaController, LaminaController_new
|
||||
from device.LaminaController import GeneratePackage_DLSP001_p280039
|
||||
from device.LaminaController import GenerateImage_DLSP001_p280039
|
||||
from device.tools.ByteConv import trans_list_to_str
|
||||
@@ -67,10 +67,10 @@ def test_record(path_CFG=None, path_data=None):
|
||||
text_cfg += f"1\r\n"
|
||||
path_CFG.write_text(text_cfg)
|
||||
|
||||
# Data File
|
||||
# Data File
|
||||
text_record = ""
|
||||
for point in data:
|
||||
# line_record = f"{point['index']},{point['timestamp'] * 1000},"
|
||||
# line_record = f"{point['index']},{point['timestamp'] * 1000},"
|
||||
line_record = f"{point['index']},{30},"
|
||||
for data_alg in point['ChAlg']:
|
||||
line_record += f"{data_alg},"
|
||||
@@ -233,17 +233,17 @@ if __name__=='__main__':
|
||||
"Debug": {'com_name': 'COM8', '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},
|
||||
'time_out': 0.5, 'time_gap': 0.02, 'retry': 3},
|
||||
}
|
||||
|
||||
dev_lamina = LaminaController(**mode_config['Debug'])
|
||||
dev_lamina = LaminaController_new(**mode_config['Debug'])
|
||||
|
||||
dev_lamina.frame_read(0x0100, 0x20)
|
||||
# dev_lamina.frame_read(0x0A, 0x20)
|
||||
# dev_lamina.frame_read(0x60, 0x60)
|
||||
|
||||
|
||||
if not hasattr(__builtins__,"__IPYTHON__") and 0: #
|
||||
if not hasattr(__builtins__,"__IPYTHON__"): # and 0
|
||||
""" 读取故障录波数据 """
|
||||
path_CFG = Path(r"D:\WorkSpace\UserTool\SelfTool\FrameParser\test\p280039\result\record4.cfg")
|
||||
path_data = Path(r"D:\WorkSpace\UserTool\SelfTool\FrameParser\test\p280039\result\record4.dat")
|
||||
@@ -262,7 +262,7 @@ if __name__=='__main__':
|
||||
dev_lamina.frame_write_one(0x60, 0)
|
||||
time.sleep(1)
|
||||
if dev_lamina.frame_update(file_hex, makefile=True):
|
||||
time.sleep(6)
|
||||
time.sleep(2)
|
||||
dev_lamina.frame_read(0x0100, 0x20)
|
||||
# dev_lamina.frame_write_one(0x52, 0x01)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user