v0.1.5.3(2024/06/14)

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

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
test.py
.idea/
aio/.idea/
aio/__pycache__/
aio/code/__pycache__/
aio/package/
aio/venv

View File

@ -1,7 +1,7 @@
### 程序功能
自动化测试数据处理工具,减少人工处理时长,提高测试数据处理的效率和准确度:
1. 制动数据,单轴数据处理5min以内
1. 制动数据,单轴数据处理3min以内
2. 电机电流数据全部轴数据处理1min以内
3. ISO激光数据整理1min以内
@ -11,21 +11,15 @@
### 第三方库
```commandline
pip3 install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 install openpyxl -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 install xlmx -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 install pdfplumber -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 install jinja2 -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 install Pillow -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
python.exe -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
```text
参考requirements.txt
```
### 打包方法
```
pyinstaller.exe -F --version-file file_version_info.txt -i .\icon.ico .\aio.py -p .\brake.py -p .\current.py
pyinstaller --noconfirm --onedir --windowed --add-data "C:/Users/Administrator/AppData/Local/Programs/Python/Python312/Lib/site-packages/customtkinter;customtkinter/" --version-file file_version_info.txt -i .\icon.ico .\aio.py -p .\brake.py -p .\iso.py -p .\current.py
pyinstaller --noconfirm --onedir --windowed --add-data "C:/Users/Administrator/AppData/Local/Programs/Python/Python312/Lib/site-packages/customtkinter;customtkinter/" --version-file ..\assets\file_version_info.txt -i ..\assets\icon.ico ..\code\aio.py -p ..\code\brake.py -p ..\code\iso.py -p ..\code\current.py
```
---
@ -209,4 +203,9 @@ v0.1.5.2(2024/06/13)
[brake.py]: 修改了速度计算逻辑新版本的vel列数据遵循如下规则av = vel * 180 / pi根据av再计算speed
[brake.py]: 将threshold修改为常量50
[brake.py]: 提高了输出提示语的明确性,删除了不必要的省略号
[brake.py]: 更正了之前的数据copy错误重新优化了estop处是否达到指定百分比的判定逻辑
[brake.py]: 更正了之前的数据copy错误重新优化了estop处是否达到指定百分比的判定逻辑
v0.1.5.3(2024/06/14)
[aio.py]: 修改w_param为84适配14寸电脑屏幕
[brake.py]: 将判定合规逻辑修改为角速度超过指定角速度的95%
[README.md]: 稍作修改,包括打包方式,功能特性等

View File

@ -6,8 +6,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
filevers=(0, 1, 5, 2),
prodvers=(0, 1, 5, 2),
filevers=(0, 1, 5, 3),
prodvers=(0, 1, 5, 3),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
@ -31,12 +31,12 @@ VSVersionInfo(
'040904b0',
[StringStruct('CompanyName', 'Rokae - https://www.rokae.com/'),
StringStruct('FileDescription', 'All in one automatic toolbox'),
StringStruct('FileVersion', '0.1.5.2 (2024-06-13)'),
StringStruct('FileVersion', '0.1.5.3 (2024-06-14)'),
StringStruct('InternalName', 'AIO.exe'),
StringStruct('LegalCopyright', '© 2024-2024 Manford Fan'),
StringStruct('OriginalFilename', 'AIO.exe'),
StringStruct('ProductName', 'AIO'),
StringStruct('ProductVersion', '0.1.5.2 (2024-06-13)')])
StringStruct('ProductVersion', '0.1.5.3 (2024-06-14)')])
]),
VarFileInfo([VarStruct('Translation', [1033, 1200])])
]

View File

@ -1 +1 @@
0.1.5.2 @ 06/13/2024
0.1.5.3 @ 06/14/2024

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