fix merging
This commit is contained in:
@ -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")
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user