v0.1.7.4(2024/07/02)
1. [APIs: openapi.py] - 增加了modbus的python实现 - heartbeat函数修改发送间隔为1s - 清除了绝大部分调试性输出,发现太多的这种输出也会导致心跳丢包...,不清楚这个原理是什么 - 在get_response函数中的while self.pkg > 0循环中,删除了else语句,因为它永不会被执行到 - 在get_response函数中,修复一个bug,在flag==0的else语句中,补齐了index==6的情况 2. [APIs: do_current.py] - 完成了六个轴的电机电流动作的执行,以及数据采集 - 完成了对应的RL程序的编写 3[APIs: aio.py] - 引入modbus实例化,并以参数的形式,传递给相应的tabview - 新增pre_warning函数,在做自动化测试之前,确保所有条件皆具备
This commit is contained in:
@ -43,6 +43,8 @@ class App(customtkinter.CTk):
|
||||
self.my_font = customtkinter.CTkFont(family="Consolas", size=16, weight="bold")
|
||||
self.w_param = 84
|
||||
self.hr = None
|
||||
self.md_at = None
|
||||
self.md_dp = None
|
||||
# =====================================================================
|
||||
# configure window
|
||||
self.title("AIO - All in one automatic toolbox")
|
||||
@ -183,6 +185,8 @@ class App(customtkinter.CTk):
|
||||
with open(f"{current_path}/../assets/templates/heartbeat", "w", encoding='utf-8') as f_hb:
|
||||
f_hb.write('0')
|
||||
self.hr = openapi.HmiRequest(self.write2textbox)
|
||||
self.md_at = openapi.ModbusRequest(self, 'Automatic Test')
|
||||
self.md_dp = openapi.ModbusRequest(self, 'Data Process')
|
||||
|
||||
while True:
|
||||
with open(f'{current_path}/../assets/templates/heartbeat', 'r', encoding='utf-8') as f_hb:
|
||||
@ -451,12 +455,20 @@ class App(customtkinter.CTk):
|
||||
elif flag == 4:
|
||||
func_dict[flag](path=args[0], w2t=self.write2textbox)
|
||||
elif flag == 5:
|
||||
self.pre_warning()
|
||||
func_dict[flag](path=args[0], hr=self.hr, loadsel=args[1], w2t=self.write2textbox)
|
||||
elif flag == 6:
|
||||
func_dict[flag](path=args[0], hr=self.hr, w2t=self.write2textbox)
|
||||
self.pre_warning()
|
||||
func_dict[flag](path=args[0], hr=self.hr, md=self.md_at, w2t=self.write2textbox)
|
||||
else:
|
||||
tkinter.messagebox.showerror(title="参数错误", message="请检查对应参数是否填写正确!", )
|
||||
|
||||
def pre_warning(self):
|
||||
if tkinter.messagebox.askyesno(title="开始运行", message="确认机器已按照测试规范更新固件,并提按照测试机型前修改好工程?"):
|
||||
pass
|
||||
else:
|
||||
self.write2textbox("请按照测试规范更新机器固件,并在实际运行前确认工程已经修改完毕,以防撞机!!!", 0, 123, 'red', 'Automatic Test')
|
||||
|
||||
def func_check_callback(self):
|
||||
self.textbox.delete(index1='1.0', index2='end')
|
||||
|
||||
|
Reference in New Issue
Block a user