From a7984a613dd9199a4684f9f233b1a4313dee54b2 Mon Sep 17 00:00:00 2001 From: gitea Date: Tue, 30 Jul 2024 12:30:37 +0800 Subject: [PATCH] =?UTF-8?q?v0.2.0.4(2024/07/30)=201.=20[APIs:=20do=5Fbrake?= =?UTF-8?q?.py]:=20=E4=BF=AE=E5=A4=8D=E5=88=B6=E5=8A=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86=E8=BF=87=E7=A8=8B=E4=B8=AD=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E5=8F=96=E6=9B=B2=E7=BA=BF=E7=9A=84=E6=9C=80=E5=90=8E=20240=20?= =?UTF-8?q?=E4=B8=AA=E6=95=B0=E6=8D=AE=202.=20[APIs:=20aio.py]:=20?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E7=89=88=E6=9C=AC=E5=A4=84=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20self.destroy()=EF=BC=8C=E5=9B=A0=E4=B8=BA=E8=AF=A5?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5=E4=BC=9A=E5=AF=BC=E8=87=B4=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=8F=91=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/README.md | 6 +++++- aio/code/aio.py | 1 - aio/code/automatic_test/do_brake.py | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aio/README.md b/aio/README.md index 0bf3d67..906fcf2 100644 --- a/aio/README.md +++ b/aio/README.md @@ -558,4 +558,8 @@ v0.2.0.3(2024/07/27) 3. [APIs: factory_test.py]: 精简程序,解决 OOM 问题 4. [APIsL openapi.py] - 心跳修改为 1 s,因为 OOM 问题的解决依赖于长久的打开曲线开关,此时对于 hr.c_msg 的定时清理是个挑战,将心跳缩短,有利于清理日志后,避免丢失心跳 - - 新增 diagnosis.save 命令,但是执行时,有问题,待解决 \ No newline at end of file + - 新增 diagnosis.save 命令,但是执行时,有问题,待解决 + +v0.2.0.4(2024/07/30) +1. [APIs: do_brake.py]: 修复制动数据处理过程中,只取曲线的最后 240 个数据 +2. [APIs: aio.py]: 判定版本处,删除 self.destroy(),因为该语句会导致异常发生 \ No newline at end of file diff --git a/aio/code/aio.py b/aio/code/aio.py index e90793b..979c7a3 100644 --- a/aio/code/aio.py +++ b/aio/code/aio.py @@ -202,7 +202,6 @@ class App(customtkinter.CTk): if cur_vers.strip() != new_vers.strip(): msg = f"""当前版本:{cur_vers}\n更新版本:{new_vers}\n\n请及时前往钉盘更新~~~""" tkinter.messagebox.showwarning(title="版本更新", message=msg) - self.destroy() except: tkinter.messagebox.showwarning(title="版本更新", message="连接服务器失败,无法确认当前是否是最新版本......") # functions below ↓ ---------------------------------------------------------------------------------------- diff --git a/aio/code/automatic_test/do_brake.py b/aio/code/automatic_test/do_brake.py index 33868d5..223b6e3 100644 --- a/aio/code/automatic_test/do_brake.py +++ b/aio/code/automatic_test/do_brake.py @@ -116,7 +116,7 @@ def gen_result_file(path, curve_data, axis, _reach, _load, _speed, count): _d2d_vel = {'hw_joint_vel_feedback': []} _d2d_trq = {'device_servo_trq_feedback': []} _d2d_stop = {'device_safety_estop': []} - for data in curve_data: + for data in curve_data[-240:]: dict_results = data['data'] for item in dict_results: try: @@ -129,8 +129,6 @@ def gen_result_file(path, curve_data, axis, _reach, _load, _speed, count): _d2d_trq['device_servo_trq_feedback'].extend(item['value']) elif item.get('channel', None) == 0 and item.get('name', None) == 'device_safety_estop': _d2d_stop['device_safety_estop'].extend(item['value']) - if len(_d2d_trq['device_servo_trq_feedback']) / 1000 > 10: - break df1 = pandas.DataFrame.from_dict(_d2d_vel) df2 = pandas.DataFrame.from_dict(_d2d_trq)