v0.1.5.3(2024/06/14)

[aio.py]: 修改w_param为84,适配14寸电脑屏幕
[brake.py]: 将判定合规逻辑修改为角速度超过指定角速度的95%
[README.md]: 稍作修改,包括打包方式,功能特性等
This commit is contained in:
2024-06-14 12:37:12 +08:00
parent 15e6f1b6c0
commit e014775972
6 changed files with 23 additions and 24 deletions

View File

@ -45,7 +45,7 @@ class App(customtkinter.CTk):
def __init__(self):
super().__init__()
self.my_font = customtkinter.CTkFont(family="Consolas", size=16, weight="bold")
self.w_param = 90
self.w_param = 84
# =====================================================================
# configure window
self.title("AIO - All in one automatic toolbox")
@ -72,7 +72,7 @@ class App(customtkinter.CTk):
btns['log']['btn'].configure(command=lambda: self.thread_it(self.func_log_callback))
btns['end']['btn'].configure(command=lambda: self.thread_it(self.func_end_callback))
# create version info
self.label_version = customtkinter.CTkLabel(self.frame_func, justify='left', text="Vers: 0.1.5.2\nDate: 06/13/2024", font=self.my_font, text_color="#4F4F4F")
self.label_version = customtkinter.CTkLabel(self.frame_func, justify='left', text="Vers: 0.1.5.3\nDate: 06/14/2024", font=self.my_font, text_color="#4F4F4F")
self.frame_func.rowconfigure(6, weight=1)
self.label_version.grid(row=6, column=0, padx=20, pady=20, sticky='s')
# =====================================================================

View File

@ -210,10 +210,10 @@ def find_row_start(data_file, df, conditions, av, rr, axis, vel, w2t, estop):
# 参数:如上
# 返回值:速度下降点位,最后的数据点位
ratio = float(conditions[2].removeprefix('speed'))/100
speed_max = av * rr * ratio * 60 / 360
av_max = av * ratio
row_max = df.index[-1]
# threshold = 30 if axis == 2 and conditions[0].removeprefix('load') == '100' else 10
threshold = 50
threshold = 0.95
for _row in range(row_max, -1, -1):
if df.iloc[_row, estop-1] != 0:
@ -230,10 +230,10 @@ def find_row_start(data_file, df, conditions, av, rr, axis, vel, w2t, estop):
else:
w2t(f"数据文件 {data_file} 最后的速度未降为零 ", 0, 10, 'red')
speed_estop = abs((df.iloc[row_start-10:row_start+10, vel-1].abs().mean() * 180) / 3.1415926 * rr * 60 / 360)
if abs(speed_estop-speed_max) > threshold:
av_estop = abs((df.iloc[row_start-10:row_start+10, vel-1].abs().mean() * 180) / 3.1415926)
if abs(av_estop/av_max) < threshold:
filename = data_file.split('\\')[-1]
w2t(f"[speed_estop: {speed_estop:.2f} | shouldbe: {speed_max:.2f}] 数据文件 {filename} 触发 ESTOP 时未采集到指定百分比的最大速度,需要检查", 0, 0, '#8A2BE2')
w2t(f"[av_estop: {av_estop:.2f} | shouldbe: {av_max:.2f}] 数据文件 {filename} 触发 ESTOP 时未采集到指定百分比的最大速度,需要检查", 0, 0, '#8A2BE2')
return row_start, row_end