优化界面 完善逻辑

This commit is contained in:
2025-03-30 18:55:39 +08:00
parent a9a6db23fd
commit 676eb49679
10 changed files with 59 additions and 42 deletions

View File

@ -186,6 +186,9 @@ class DoBrakeTest(QThread):
self.logger("INFO", "brake", "-" * 90, "purple")
speed_max = 0
for rounds in range(1, 4):
if clibs.stop_flag:
self.logger("ERROR", "do_brake", "后台数据清零完成,现在可以重新运行其他程序。", "green")
count += 1
_ = 3 if count % 3 == 0 else count % 3
this_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
@ -356,9 +359,6 @@ class DoBrakeTest(QThread):
clibs.running[self.idx] = 1
if clibs.status["hmi"] != 1 or clibs.status["md"] != 1 or clibs.status["ec"] != 1:
self.logger("ERROR", "do_brake", "processing: 需要在网络设置中连接HMIModbus通信以及外部通信", "red")
t = threading.Thread(target=clibs.running_detection, args=(self.idx, ))
t.daemon = True
t.start()
data_dirs, data_files = clibs.traversal_files(self.dir_path)
config_file, prj_file, result_dirs, avs = self.initialization(data_dirs, data_files)

View File

@ -183,6 +183,9 @@ class DoCurrentTest(QThread):
clibs.c_md.r_clear_alarm()
for condition in conditions:
if clibs.stop_flag:
self.logger("ERROR", "do_current", "后台数据清零完成,现在可以重新运行其他程序。", "green")
number = conditions.index(condition)
# for testing
# if number < 12: