Compare commits
6 Commits
pre-module
...
android-ma
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69bd3d1d8e | ||
|
|
360b57e3e2 | ||
|
|
c5f4f854bf | ||
|
|
551022215c | ||
|
|
7323021aec | ||
|
|
a85ce0b4a2 |
52
README.md
@@ -1,10 +1,11 @@
|
|||||||
# Tauri Demo (SvelteKit + TypeScript)
|
# JE-Skin (SvelteKit + Tauri)
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
- Node.js 18+(建议 LTS)
|
- Node.js 18+(建议 LTS)
|
||||||
- Rust stable(`rustup` + `cargo`)
|
- Rust stable(`rustup` + `cargo`)
|
||||||
- Windows 下请确保已安装 WebView2 Runtime 和 MSVC C++ 构建工具
|
- Windows 下请确保已安装 WebView2 Runtime 和 MSVC C++ 构建工具
|
||||||
|
- Android 构建需要 Android SDK + NDK
|
||||||
|
|
||||||
## 安装依赖
|
## 安装依赖
|
||||||
|
|
||||||
@@ -42,12 +43,61 @@ npm run build
|
|||||||
npm run tauri build
|
npm run tauri build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
构建 Android APK / AAB:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npx tauri android build
|
||||||
|
```
|
||||||
|
|
||||||
|
产物路径:
|
||||||
|
- APK: `src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk`
|
||||||
|
- AAB: `src-tauri/gen/android/app/build/outputs/bundle/universalRelease/app-universal-release.aab`
|
||||||
|
|
||||||
|
Release APK 默认使用 debug keystore 签名(`src-tauri/gen/android/app/je-skin-debug.keystore`),可直接 `adb install` 到设备。
|
||||||
|
|
||||||
## 代码检查
|
## 代码检查
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run check
|
npm run check
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## v0.5.0 修改记录
|
||||||
|
|
||||||
|
### Android USB 串口接入
|
||||||
|
|
||||||
|
- **Tauri 插件注册**:Android 端通过 Rust builder 注册 `usb-serial` 插件,移除 `MainActivity` 中的手动加载逻辑
|
||||||
|
- **USB 设备枚举**:使用 `usb-serial-for-android` 的 `UsbSerialProber` 识别串口设备,并返回设备名、厂商 ID、产品 ID、权限状态等信息
|
||||||
|
- **USB 权限申请**:完善 Android USB 授权回调,支持按设备名、vendorId/productId 解析设备并处理授权后的打开流程
|
||||||
|
- **串口数据桥接**:Kotlin 端打开 USB serial port 后通过 Unix socketpair 将 fd 交给 Rust,Rust 端继续复用 `serial_connect_fd` 数据采集链路
|
||||||
|
- **资源释放**:关闭连接时同步释放桥接 fd、USB serial port 和 `UsbDeviceConnection`,避免重复打开后的资源残留
|
||||||
|
|
||||||
|
### Tauri 权限与构建
|
||||||
|
|
||||||
|
- 新增 `src-tauri/permissions/usb-serial/default.toml`,声明 Android USB serial 插件命令和前端所需本地命令权限
|
||||||
|
- `default.json` 增加 USB serial 与本地命令权限,兼容 snake_case / camelCase 插件命令名
|
||||||
|
- Android Gradle 仓库加入 JitPack,用于解析 USB serial 驱动依赖
|
||||||
|
- ProGuard 增加 Tauri 插件注解、`UsbSerialPlugin` 和 `com.hoho.android.usbserial` 保留规则,避免 release 包混淆后插件命令失效
|
||||||
|
- Android 构建下 `serial_enum` 返回空列表,并仅保留 fd 连接入口,避免桌面串口枚举依赖进入 Android 编译路径
|
||||||
|
|
||||||
|
## v0.4.0 修改记录
|
||||||
|
|
||||||
|
### 移动端性能优化
|
||||||
|
|
||||||
|
- **SignalChart / SummaryCurve**:在 `@media (max-width: 900px)` 下移除 SVG 路径上的 `filter: drop-shadow()`,避免移动端 GPU 软件回流导致卡顿
|
||||||
|
- **SignalChart**:隐藏 `.scan-haze`(`mix-blend-mode: screen` 合成开销大),简化面板 `background` / `box-shadow`
|
||||||
|
- **SummaryCurve**:移动端移除 `.summary-line` 和 `.summary-dot` 的 drop-shadow 滤镜
|
||||||
|
- **页面级**:移动端隐藏 `.hud-noise`(`feTurbulence` SVG 滤镜是最大性能杀手),降低 `.hud-vignette` 透明度,简化 `.hud-gradient`
|
||||||
|
- 移除 inactive 面板的 `filter: blur()` 过渡动画
|
||||||
|
- 移除 transition 中的 `filter` 属性,添加 `will-change: d` 优化路径更新
|
||||||
|
|
||||||
|
### 移动端 UI 调整
|
||||||
|
|
||||||
|
- **隐藏三大金刚**:`@media (max-width: 900px)` 下隐藏标题栏右侧的最小化/最大化/关闭按钮(Android 系统自带窗口管理)
|
||||||
|
|
||||||
|
### Android 打包
|
||||||
|
|
||||||
|
- Release 构建配置使用 debug keystore 签名,输出签名 APK 而非 unsigned
|
||||||
|
|
||||||
## 推荐 IDE 插件
|
## 推荐 IDE 插件
|
||||||
|
|
||||||
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
|
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
|
||||||
|
|||||||
@@ -1,363 +0,0 @@
|
|||||||
('D:\\JE-Skin\\devkit\\dist\\je-skin-devkit-server.exe',
|
|
||||||
True,
|
|
||||||
False,
|
|
||||||
False,
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico',
|
|
||||||
None,
|
|
||||||
False,
|
|
||||||
False,
|
|
||||||
b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<assembly xmlns='
|
|
||||||
b'"urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">\n <trustInfo x'
|
|
||||||
b'mlns="urn:schemas-microsoft-com:asm.v3">\n <security>\n <requested'
|
|
||||||
b'Privileges>\n <requestedExecutionLevel level="asInvoker" uiAccess='
|
|
||||||
b'"false"/>\n </requestedPrivileges>\n </security>\n </trustInfo>\n '
|
|
||||||
b'<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">\n <'
|
|
||||||
b'application>\n <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f'
|
|
||||||
b'0}"/>\n <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>\n '
|
|
||||||
b' <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>\n <s'
|
|
||||||
b'upportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>\n <supporte'
|
|
||||||
b'dOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>\n </application>\n <'
|
|
||||||
b'/compatibility>\n <application xmlns="urn:schemas-microsoft-com:asm.v3">'
|
|
||||||
b'\n <windowsSettings>\n <longPathAware xmlns="http://schemas.micros'
|
|
||||||
b'oft.com/SMI/2016/WindowsSettings">true</longPathAware>\n </windowsSett'
|
|
||||||
b'ings>\n </application>\n <dependency>\n <dependentAssembly>\n <ass'
|
|
||||||
b'emblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version='
|
|
||||||
b'"6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" langua'
|
|
||||||
b'ge="*"/>\n </dependentAssembly>\n </dependency>\n</assembly>',
|
|
||||||
True,
|
|
||||||
False,
|
|
||||||
None,
|
|
||||||
None,
|
|
||||||
None,
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\je-skin-devkit-server.pkg',
|
|
||||||
[('pyi-contents-directory _internal', '', 'OPTION'),
|
|
||||||
('PYZ-00.pyz',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\PYZ-00.pyz',
|
|
||||||
'PYZ'),
|
|
||||||
('struct',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\struct.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod01_archive',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod01_archive.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod02_importers',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod02_importers.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod03_ctypes',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod03_ctypes.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod04_pywin32',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod04_pywin32.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyiboot01_bootstrap',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_inspect',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_pkgutil',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_multiprocessing',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('sensor_server', 'D:\\JE-Skin\\devkit\\sensor_server.py', 'PYSOURCE'),
|
|
||||||
('python314.dll', 'C:\\Python314\\python314.dll', 'BINARY'),
|
|
||||||
('numpy.libs\\libscipy_openblas64_-63c857e738469261263c764a36be9436.dll',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy.libs\\libscipy_openblas64_-63c857e738469261263c764a36be9436.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('numpy.libs\\msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy.libs\\msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('select.pyd', 'C:\\Python314\\DLLs\\select.pyd', 'EXTENSION'),
|
|
||||||
('_multiprocessing.pyd',
|
|
||||||
'C:\\Python314\\DLLs\\_multiprocessing.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_zstd.pyd', 'C:\\Python314\\DLLs\\_zstd.pyd', 'EXTENSION'),
|
|
||||||
('pyexpat.pyd', 'C:\\Python314\\DLLs\\pyexpat.pyd', 'EXTENSION'),
|
|
||||||
('_lzma.pyd', 'C:\\Python314\\DLLs\\_lzma.pyd', 'EXTENSION'),
|
|
||||||
('_bz2.pyd', 'C:\\Python314\\DLLs\\_bz2.pyd', 'EXTENSION'),
|
|
||||||
('_ssl.pyd', 'C:\\Python314\\DLLs\\_ssl.pyd', 'EXTENSION'),
|
|
||||||
('_hashlib.pyd', 'C:\\Python314\\DLLs\\_hashlib.pyd', 'EXTENSION'),
|
|
||||||
('unicodedata.pyd', 'C:\\Python314\\DLLs\\unicodedata.pyd', 'EXTENSION'),
|
|
||||||
('_decimal.pyd', 'C:\\Python314\\DLLs\\_decimal.pyd', 'EXTENSION'),
|
|
||||||
('_socket.pyd', 'C:\\Python314\\DLLs\\_socket.pyd', 'EXTENSION'),
|
|
||||||
('_ctypes.pyd', 'C:\\Python314\\DLLs\\_ctypes.pyd', 'EXTENSION'),
|
|
||||||
('_queue.pyd', 'C:\\Python314\\DLLs\\_queue.pyd', 'EXTENSION'),
|
|
||||||
('numpy\\_core\\_multiarray_tests.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\_core\\_multiarray_tests.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\_core\\_multiarray_umath.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\_core\\_multiarray_umath.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_wmi.pyd', 'C:\\Python314\\DLLs\\_wmi.pyd', 'EXTENSION'),
|
|
||||||
('_overlapped.pyd', 'C:\\Python314\\DLLs\\_overlapped.pyd', 'EXTENSION'),
|
|
||||||
('_asyncio.pyd', 'C:\\Python314\\DLLs\\_asyncio.pyd', 'EXTENSION'),
|
|
||||||
('numpy\\linalg\\_umath_linalg.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\linalg\\_umath_linalg.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\mtrand.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\mtrand.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\bit_generator.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\bit_generator.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_sfc64.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_sfc64.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_philox.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_philox.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_pcg64.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_pcg64.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_mt19937.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_mt19937.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_generator.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_generator.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_common.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_common.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_bounded_integers.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_bounded_integers.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\fft\\_pocketfft_umath.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\fft\\_pocketfft_umath.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_elementtree.pyd', 'C:\\Python314\\DLLs\\_elementtree.pyd', 'EXTENSION'),
|
|
||||||
('grpc\\_cython\\cygrpc.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\cygrpc.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('google\\_upb\\_message.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\google\\_upb\\_message.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('grpc_tools\\_protoc_compiler.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc_tools\\_protoc_compiler.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('api-ms-win-crt-locale-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-locale-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-convert-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-convert-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-filesystem-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-filesystem-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-heap-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-heap-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('VCRUNTIME140.dll', 'C:\\Python314\\VCRUNTIME140.dll', 'BINARY'),
|
|
||||||
('api-ms-win-crt-conio-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-conio-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-runtime-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-runtime-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-stdio-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-stdio-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-process-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-process-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-environment-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-environment-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-math-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-math-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-time-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-time-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-string-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-string-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-private-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-private-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-utility-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-utility-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('VCRUNTIME140_1.dll', 'C:\\Python314\\VCRUNTIME140_1.dll', 'BINARY'),
|
|
||||||
('libssl-3.dll', 'C:\\Python314\\DLLs\\libssl-3.dll', 'BINARY'),
|
|
||||||
('libcrypto-3.dll', 'C:\\Python314\\DLLs\\libcrypto-3.dll', 'BINARY'),
|
|
||||||
('libffi-8.dll', 'C:\\Python314\\DLLs\\libffi-8.dll', 'BINARY'),
|
|
||||||
('python3.dll', 'C:\\Python314\\python3.dll', 'BINARY'),
|
|
||||||
('ucrtbase.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\ucrtbase.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processenvironment-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processenvironment-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-timezone-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-timezone-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-libraryloader-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-libraryloader-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-util-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-util-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-debug-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-debug-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l2-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l2-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-namedpipe-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-namedpipe-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-sysinfo-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-sysinfo-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-interlocked-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-interlocked-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-localization-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-localization-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-synch-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-synch-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-profile-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-profile-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-fibers-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-fibers-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-handle-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-handle-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-synch-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-synch-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-string-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-string-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-memory-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-memory-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-heap-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-heap-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-console-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-console-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-rtlsupport-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-rtlsupport-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-datetime-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-datetime-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-errorhandling-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-errorhandling-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processthreads-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processthreads-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processthreads-l1-1-1.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processthreads-l1-1-1.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('sensor_stream_pb2.py', 'D:\\JE-Skin\\devkit\\sensor_stream_pb2.py', 'DATA'),
|
|
||||||
('sensor_stream_pb2_grpc.py',
|
|
||||||
'D:\\JE-Skin\\devkit\\sensor_stream_pb2_grpc.py',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_credentials\\roots.pem',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_credentials\\roots.pem',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.h',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.h',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.cc',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.cc',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\WHEEL',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\WHEEL',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\sfc64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\sfc64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\entry_points.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\entry_points.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\ma\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\ma\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\INSTALLER',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\INSTALLER',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\DELVEWHEEL',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\DELVEWHEEL',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\pcg64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\pcg64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\include\\numpy\\libdivide\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\include\\numpy\\libdivide\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\npysort\\x86-simd-sort\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\npysort\\x86-simd-sort\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\REQUESTED',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\REQUESTED',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\multiarray\\dragon4_LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\multiarray\\dragon4_LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\common\\pythoncapi-compat\\COPYING',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\common\\pythoncapi-compat\\COPYING',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\splitmix64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\splitmix64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\distributions\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\distributions\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\umath\\svml\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\umath\\svml\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\METADATA',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\METADATA',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\mt19937\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\mt19937\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\highway\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\highway\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\philox\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\philox\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\fft\\pocketfft\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\fft\\pocketfft\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\linalg\\lapack_lite\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\linalg\\lapack_lite\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\RECORD',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\RECORD',
|
|
||||||
'DATA'),
|
|
||||||
('base_library.zip',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\base_library.zip',
|
|
||||||
'DATA')],
|
|
||||||
[],
|
|
||||||
False,
|
|
||||||
False,
|
|
||||||
1777347409,
|
|
||||||
[('run.exe',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\bootloader\\Windows-64bit-intel\\run.exe',
|
|
||||||
'EXECUTABLE')],
|
|
||||||
'C:\\Python314\\python314.dll')
|
|
||||||
@@ -1,341 +0,0 @@
|
|||||||
('D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\je-skin-devkit-server.pkg',
|
|
||||||
{'BINARY': True,
|
|
||||||
'DATA': True,
|
|
||||||
'EXECUTABLE': True,
|
|
||||||
'EXTENSION': True,
|
|
||||||
'PYMODULE': True,
|
|
||||||
'PYSOURCE': True,
|
|
||||||
'PYZ': False,
|
|
||||||
'SPLASH': True,
|
|
||||||
'SYMLINK': False},
|
|
||||||
[('pyi-contents-directory _internal', '', 'OPTION'),
|
|
||||||
('PYZ-00.pyz',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\PYZ-00.pyz',
|
|
||||||
'PYZ'),
|
|
||||||
('struct',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\struct.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod01_archive',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod01_archive.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod02_importers',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod02_importers.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod03_ctypes',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod03_ctypes.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyimod04_pywin32',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\localpycs\\pyimod04_pywin32.pyc',
|
|
||||||
'PYMODULE'),
|
|
||||||
('pyiboot01_bootstrap',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_inspect',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_pkgutil',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('pyi_rth_multiprocessing',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py',
|
|
||||||
'PYSOURCE'),
|
|
||||||
('sensor_server', 'D:\\JE-Skin\\devkit\\sensor_server.py', 'PYSOURCE'),
|
|
||||||
('python314.dll', 'C:\\Python314\\python314.dll', 'BINARY'),
|
|
||||||
('numpy.libs\\libscipy_openblas64_-63c857e738469261263c764a36be9436.dll',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy.libs\\libscipy_openblas64_-63c857e738469261263c764a36be9436.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('numpy.libs\\msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy.libs\\msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('select.pyd', 'C:\\Python314\\DLLs\\select.pyd', 'EXTENSION'),
|
|
||||||
('_multiprocessing.pyd',
|
|
||||||
'C:\\Python314\\DLLs\\_multiprocessing.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_zstd.pyd', 'C:\\Python314\\DLLs\\_zstd.pyd', 'EXTENSION'),
|
|
||||||
('pyexpat.pyd', 'C:\\Python314\\DLLs\\pyexpat.pyd', 'EXTENSION'),
|
|
||||||
('_lzma.pyd', 'C:\\Python314\\DLLs\\_lzma.pyd', 'EXTENSION'),
|
|
||||||
('_bz2.pyd', 'C:\\Python314\\DLLs\\_bz2.pyd', 'EXTENSION'),
|
|
||||||
('_ssl.pyd', 'C:\\Python314\\DLLs\\_ssl.pyd', 'EXTENSION'),
|
|
||||||
('_hashlib.pyd', 'C:\\Python314\\DLLs\\_hashlib.pyd', 'EXTENSION'),
|
|
||||||
('unicodedata.pyd', 'C:\\Python314\\DLLs\\unicodedata.pyd', 'EXTENSION'),
|
|
||||||
('_decimal.pyd', 'C:\\Python314\\DLLs\\_decimal.pyd', 'EXTENSION'),
|
|
||||||
('_socket.pyd', 'C:\\Python314\\DLLs\\_socket.pyd', 'EXTENSION'),
|
|
||||||
('_ctypes.pyd', 'C:\\Python314\\DLLs\\_ctypes.pyd', 'EXTENSION'),
|
|
||||||
('_queue.pyd', 'C:\\Python314\\DLLs\\_queue.pyd', 'EXTENSION'),
|
|
||||||
('numpy\\_core\\_multiarray_tests.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\_core\\_multiarray_tests.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\_core\\_multiarray_umath.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\_core\\_multiarray_umath.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_wmi.pyd', 'C:\\Python314\\DLLs\\_wmi.pyd', 'EXTENSION'),
|
|
||||||
('_overlapped.pyd', 'C:\\Python314\\DLLs\\_overlapped.pyd', 'EXTENSION'),
|
|
||||||
('_asyncio.pyd', 'C:\\Python314\\DLLs\\_asyncio.pyd', 'EXTENSION'),
|
|
||||||
('numpy\\linalg\\_umath_linalg.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\linalg\\_umath_linalg.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\mtrand.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\mtrand.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\bit_generator.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\bit_generator.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_sfc64.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_sfc64.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_philox.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_philox.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_pcg64.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_pcg64.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_mt19937.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_mt19937.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_generator.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_generator.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_common.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_common.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\random\\_bounded_integers.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\random\\_bounded_integers.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('numpy\\fft\\_pocketfft_umath.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy\\fft\\_pocketfft_umath.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('_elementtree.pyd', 'C:\\Python314\\DLLs\\_elementtree.pyd', 'EXTENSION'),
|
|
||||||
('grpc\\_cython\\cygrpc.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\cygrpc.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('google\\_upb\\_message.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\google\\_upb\\_message.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('grpc_tools\\_protoc_compiler.cp314-win_amd64.pyd',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc_tools\\_protoc_compiler.cp314-win_amd64.pyd',
|
|
||||||
'EXTENSION'),
|
|
||||||
('api-ms-win-crt-locale-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-locale-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-convert-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-convert-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-filesystem-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-filesystem-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-heap-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-heap-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('VCRUNTIME140.dll', 'C:\\Python314\\VCRUNTIME140.dll', 'BINARY'),
|
|
||||||
('api-ms-win-crt-conio-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-conio-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-runtime-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-runtime-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-stdio-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-stdio-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-process-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-process-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-environment-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-environment-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-math-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-math-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-time-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-time-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-string-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-string-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-private-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-private-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-crt-utility-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-crt-utility-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('VCRUNTIME140_1.dll', 'C:\\Python314\\VCRUNTIME140_1.dll', 'BINARY'),
|
|
||||||
('libssl-3.dll', 'C:\\Python314\\DLLs\\libssl-3.dll', 'BINARY'),
|
|
||||||
('libcrypto-3.dll', 'C:\\Python314\\DLLs\\libcrypto-3.dll', 'BINARY'),
|
|
||||||
('libffi-8.dll', 'C:\\Python314\\DLLs\\libffi-8.dll', 'BINARY'),
|
|
||||||
('python3.dll', 'C:\\Python314\\python3.dll', 'BINARY'),
|
|
||||||
('ucrtbase.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\ucrtbase.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processenvironment-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processenvironment-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-timezone-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-timezone-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-libraryloader-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-libraryloader-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-util-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-util-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-debug-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-debug-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-file-l2-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-file-l2-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-namedpipe-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-namedpipe-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-sysinfo-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-sysinfo-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-interlocked-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-interlocked-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-localization-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-localization-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-synch-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-synch-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-profile-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-profile-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-fibers-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-fibers-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-handle-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-handle-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-synch-l1-2-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-synch-l1-2-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-string-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-string-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-memory-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-memory-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-heap-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-heap-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-console-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-console-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-rtlsupport-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-rtlsupport-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-datetime-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-datetime-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-errorhandling-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-errorhandling-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processthreads-l1-1-0.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processthreads-l1-1-0.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('api-ms-win-core-processthreads-l1-1-1.dll',
|
|
||||||
'C:\\Users\\Administrator\\miniconda3\\api-ms-win-core-processthreads-l1-1-1.dll',
|
|
||||||
'BINARY'),
|
|
||||||
('sensor_stream_pb2.py', 'D:\\JE-Skin\\devkit\\sensor_stream_pb2.py', 'DATA'),
|
|
||||||
('sensor_stream_pb2_grpc.py',
|
|
||||||
'D:\\JE-Skin\\devkit\\sensor_stream_pb2_grpc.py',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_credentials\\roots.pem',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_credentials\\roots.pem',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.h',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.h',
|
|
||||||
'DATA'),
|
|
||||||
('grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.cc',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\grpc\\_cython\\_cygrpc\\private_key_signing\\private_key_signer_py_wrapper.cc',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\WHEEL',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\WHEEL',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\sfc64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\sfc64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\entry_points.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\entry_points.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\ma\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\ma\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\INSTALLER',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\INSTALLER',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\DELVEWHEEL',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\DELVEWHEEL',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\pcg64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\pcg64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\include\\numpy\\libdivide\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\include\\numpy\\libdivide\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\npysort\\x86-simd-sort\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\npysort\\x86-simd-sort\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\REQUESTED',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\REQUESTED',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\multiarray\\dragon4_LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\multiarray\\dragon4_LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\common\\pythoncapi-compat\\COPYING',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\common\\pythoncapi-compat\\COPYING',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\splitmix64\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\splitmix64\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\distributions\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\distributions\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\umath\\svml\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\umath\\svml\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\METADATA',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\METADATA',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\mt19937\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\mt19937\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\highway\\LICENSE',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\_core\\src\\highway\\LICENSE',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\philox\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\random\\src\\philox\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\fft\\pocketfft\\LICENSE.md',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\fft\\pocketfft\\LICENSE.md',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\licenses\\numpy\\linalg\\lapack_lite\\LICENSE.txt',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\licenses\\numpy\\linalg\\lapack_lite\\LICENSE.txt',
|
|
||||||
'DATA'),
|
|
||||||
('numpy-2.4.4.dist-info\\RECORD',
|
|
||||||
'C:\\Python314\\Lib\\site-packages\\numpy-2.4.4.dist-info\\RECORD',
|
|
||||||
'DATA'),
|
|
||||||
('base_library.zip',
|
|
||||||
'D:\\JE-Skin\\devkit\\build\\je-skin-devkit-server\\base_library.zip',
|
|
||||||
'DATA')],
|
|
||||||
'python314.dll',
|
|
||||||
False,
|
|
||||||
False,
|
|
||||||
False,
|
|
||||||
[],
|
|
||||||
None,
|
|
||||||
None,
|
|
||||||
None)
|
|
||||||
@@ -1,245 +0,0 @@
|
|||||||
|
|
||||||
This file lists modules PyInstaller was not able to find. This does not
|
|
||||||
necessarily mean these modules are required for running your program. Both
|
|
||||||
Python's standard library and 3rd-party Python packages often conditionally
|
|
||||||
import optional modules, some of which may be available only on certain
|
|
||||||
platforms.
|
|
||||||
|
|
||||||
Types of import:
|
|
||||||
* top-level: imported at the top-level - look at these first
|
|
||||||
* conditional: imported within an if-statement
|
|
||||||
* delayed: imported within a function
|
|
||||||
* optional: imported within a try-except-statement
|
|
||||||
|
|
||||||
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
|
||||||
tracking down the missing module yourself. Thanks!
|
|
||||||
|
|
||||||
missing module named pwd - imported by posixpath (delayed, conditional, optional), subprocess (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (optional), netrc (delayed, optional), http.server (delayed, optional)
|
|
||||||
missing module named grp - imported by subprocess (delayed, conditional, optional), shutil (delayed, optional), tarfile (optional), pathlib (optional)
|
|
||||||
missing module named 'collections.abc' - imported by typing (top-level), tracemalloc (top-level), traceback (top-level), _colorize (top-level), selectors (top-level), logging (top-level), http.client (top-level), importlib.resources.readers (top-level), inspect (top-level), multiprocessing.managers (top-level), typing_extensions (top-level), asyncio.base_events (top-level), asyncio.coroutines (top-level), grpc.aio._metadata (top-level), google.protobuf.internal.containers (top-level), google.protobuf.internal.well_known_types (top-level), numpy._typing._array_like (top-level), numpy._typing._nested_sequence (conditional), numpy._typing._shape (top-level), numpy._typing._dtype_like (top-level), numpy.lib._function_base_impl (top-level), _pyrepl.types (top-level), numpy.lib._npyio_impl (top-level), numpy.random._common (top-level), numpy.random._generator (top-level), numpy.random.bit_generator (top-level), numpy.random.mtrand (top-level), numpy.polynomial._polybase (top-level), xml.etree.ElementTree (top-level)
|
|
||||||
missing module named _posixsubprocess - imported by subprocess (conditional), multiprocessing.util (delayed)
|
|
||||||
missing module named fcntl - imported by subprocess (optional), pathlib._os (optional)
|
|
||||||
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
|
|
||||||
missing module named _scproxy - imported by urllib.request (conditional)
|
|
||||||
missing module named posix - imported by os (conditional, optional), posixpath (optional), shutil (conditional), importlib._bootstrap_external (conditional), pathlib._os (optional), _pyrepl.trace (conditional)
|
|
||||||
missing module named resource - imported by posix (top-level)
|
|
||||||
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
|
|
||||||
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
|
|
||||||
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
|
||||||
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.forkserver (top-level), multiprocessing.connection (top-level)
|
|
||||||
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
|
|
||||||
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
|
|
||||||
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
|
||||||
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
|
||||||
missing module named pyimod02_importers - imported by C:\Python314\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (delayed)
|
|
||||||
missing module named _dummy_thread - imported by numpy._core.arrayprint (optional)
|
|
||||||
missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
|
||||||
missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
|
||||||
missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
|
|
||||||
missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional)
|
|
||||||
missing module named charset_normalizer - imported by numpy.f2py.crackfortran (optional)
|
|
||||||
missing module named vms_lib - imported by platform (delayed, optional)
|
|
||||||
missing module named 'java.lang' - imported by platform (delayed, optional)
|
|
||||||
missing module named java - imported by platform (delayed)
|
|
||||||
missing module named psutil - imported by numpy.testing._private.utils (delayed, optional)
|
|
||||||
missing module named termios - imported by tty (top-level), _pyrepl.pager (delayed, optional)
|
|
||||||
missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, conditional, optional), rlcompleter (optional)
|
|
||||||
missing module named win32pdh - imported by numpy.testing._private.utils (delayed, conditional)
|
|
||||||
missing module named _typeshed - imported by numpy.random.bit_generator (top-level)
|
|
||||||
missing module named numpy.random.RandomState - imported by numpy.random (top-level), numpy.random._generator (top-level)
|
|
||||||
missing module named threadpoolctl - imported by numpy.lib._utils_impl (delayed, optional)
|
|
||||||
missing module named numpy._core.zeros - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.vstack - imported by numpy._core (top-level), numpy.lib._shape_base_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.void - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.vecmat - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.vecdot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.ushort - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.unsignedinteger - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ulonglong - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ulong - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.uintp - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.uintc - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.uint64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.uint32 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.uint16 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.uint - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ubyte - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.trunc - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.true_divide - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.transpose - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._function_base_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.trace - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.timedelta64 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.tensordot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.tanh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.tan - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.swapaxes - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.sum - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.subtract - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.str_ - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.square - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.sqrt - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.spacing - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.sort - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.sinh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.single - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.signedinteger - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.signbit - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.sign - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.short - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.rint - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.right_shift - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.result_type - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.remainder - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.reciprocal - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.radians - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.rad2deg - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.prod - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.power - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.positive - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.pi - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.outer - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.ones - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.object_ - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.number - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.not_equal - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.nextafter - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.newaxis - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.negative - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ndarray - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy.lib._utils_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.multiply - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.moveaxis - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.modf - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.mod - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.minimum - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.maximum - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.max - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.matvec - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.matrix_transpose - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.matmul - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.longlong - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.longdouble - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.long - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logical_xor - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logical_or - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logical_not - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logical_and - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logaddexp2 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.logaddexp - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.log10 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.log2 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.log1p - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.log - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.linspace - imported by numpy._core (top-level), numpy.lib._index_tricks_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.less_equal - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.less - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.left_shift - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ldexp - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.lcm - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.isscalar - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.isnat - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.isnan - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.isfinite - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.intp - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.integer - imported by numpy._core (conditional), numpy (conditional), numpy.fft._helper (top-level)
|
|
||||||
missing module named numpy._core.intc - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.int64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.int32 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.int16 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.int8 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.inf - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.inexact - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.iinfo - imported by numpy._core (top-level), numpy.lib._twodim_base_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.hypot - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.hstack - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.heaviside - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.half - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.greater_equal - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.greater - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.gcd - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.frompyfunc - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.frexp - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.fmod - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.fmin - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.fmax - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.floor_divide - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.floor - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.floating - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.float_power - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.float32 - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.float16 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.finfo - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.fabs - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.expm1 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.exp2 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.exp - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.euler_gamma - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.errstate - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.equal - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.empty_like - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.empty - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy.fft._helper (top-level)
|
|
||||||
missing module named numpy._core.e - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.double - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.dot - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.divmod - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.divide - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.diagonal - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.degrees - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.deg2rad - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.datetime64 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.csingle - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.cross - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.count_nonzero - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.cosh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.cos - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.copysign - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.conjugate - imported by numpy._core (conditional), numpy (conditional), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.conj - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.complexfloating - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.complex64 - imported by numpy._core (conditional), numpy (conditional), numpy._array_api_info (top-level)
|
|
||||||
missing module named numpy._core.clongdouble - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.character - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.ceil - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.cdouble - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.cbrt - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bytes_ - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.byte - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bool_ - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bitwise_xor - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bitwise_or - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bitwise_count - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.bitwise_and - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.atleast_3d - imported by numpy._core (top-level), numpy.lib._shape_base_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.atleast_2d - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.atleast_1d - imported by numpy._core (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.asarray - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.lib._array_utils_impl (top-level), numpy (conditional), numpy.fft._helper (top-level), numpy.fft._pocketfft (top-level)
|
|
||||||
missing module named numpy._core.asanyarray - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.array_repr - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.array2string - imported by numpy._core (delayed), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.array - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (top-level), numpy.lib._polynomial_impl (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.argsort - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.arctanh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arctan2 - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arctan - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arcsinh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arcsin - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arccosh - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arccos - imported by numpy._core (conditional), numpy (conditional)
|
|
||||||
missing module named numpy._core.arange - imported by numpy._core (top-level), numpy.testing._private.utils (top-level), numpy (conditional), numpy.fft._helper (top-level)
|
|
||||||
missing module named numpy._core.amin - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.amax - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named numpy._core.all - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy.testing._private.utils (delayed), numpy (conditional)
|
|
||||||
missing module named numpy._core.add - imported by numpy._core (top-level), numpy.linalg._linalg (top-level), numpy (conditional)
|
|
||||||
missing module named yaml - imported by numpy.__config__ (delayed)
|
|
||||||
missing module named numpy._distributor_init_local - imported by numpy (optional), numpy._distributor_init (optional)
|
|
||||||
missing module named defusedxml - imported by openpyxl.xml (delayed, optional)
|
|
||||||
missing module named lxml - imported by openpyxl.xml (delayed, optional)
|
|
||||||
missing module named 'defusedxml.ElementTree' - imported by openpyxl.xml.functions (conditional)
|
|
||||||
missing module named 'lxml.etree' - imported by openpyxl.xml.functions (conditional)
|
|
||||||
missing module named PIL - imported by openpyxl.drawing.image (optional)
|
|
||||||
missing module named openpyxl.tests - imported by openpyxl.reader.excel (optional)
|
|
||||||
missing module named google.protobuf.pyext._message - imported by google.protobuf.pyext (conditional, optional), google.protobuf.internal.api_implementation (conditional, optional), google.protobuf.descriptor (conditional), google.protobuf.pyext.cpp_message (conditional)
|
|
||||||
missing module named google.protobuf.enable_deterministic_proto_serialization - imported by google.protobuf (optional), google.protobuf.internal.api_implementation (optional)
|
|
||||||
missing module named google.protobuf.internal._api_implementation - imported by google.protobuf.internal (optional), google.protobuf.internal.api_implementation (optional)
|
|
||||||
missing module named grpc_reflection - imported by grpc (optional)
|
|
||||||
missing module named grpc_health - imported by grpc (optional)
|
|
||||||
missing module named pkg_resources - imported by grpc_tools.protoc (conditional)
|
|
||||||
56
package-lock.json
generated
@@ -6,7 +6,7 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "JE-Skin",
|
"name": "JE-Skin",
|
||||||
"version": "0.3.0",
|
"version": "0.4.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2",
|
"@tauri-apps/api": "^2",
|
||||||
@@ -625,9 +625,6 @@
|
|||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -642,9 +639,6 @@
|
|||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -659,9 +653,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -676,9 +667,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -693,9 +681,6 @@
|
|||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -710,9 +695,6 @@
|
|||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -727,9 +709,6 @@
|
|||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -744,9 +723,6 @@
|
|||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -761,9 +737,6 @@
|
|||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -778,9 +751,6 @@
|
|||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -795,9 +765,6 @@
|
|||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -812,9 +779,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -829,9 +793,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1130,9 +1091,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "Apache-2.0 OR MIT",
|
"license": "Apache-2.0 OR MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1150,9 +1108,6 @@
|
|||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "Apache-2.0 OR MIT",
|
"license": "Apache-2.0 OR MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1170,9 +1125,6 @@
|
|||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "Apache-2.0 OR MIT",
|
"license": "Apache-2.0 OR MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1190,9 +1142,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"glibc"
|
|
||||||
],
|
|
||||||
"license": "Apache-2.0 OR MIT",
|
"license": "Apache-2.0 OR MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
@@ -1210,9 +1159,6 @@
|
|||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"libc": [
|
|
||||||
"musl"
|
|
||||||
],
|
|
||||||
"license": "Apache-2.0 OR MIT",
|
"license": "Apache-2.0 OR MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
[registries.kellnr]
|
|
||||||
index = "sparse+http://crates.huangyanjie.com/api/v1/crates/"
|
|
||||||
11
src-tauri/.gitignore
vendored
@@ -7,3 +7,14 @@
|
|||||||
# will have schema files for capabilities auto-completion
|
# will have schema files for capabilities auto-completion
|
||||||
/gen/schemas
|
/gen/schemas
|
||||||
*log*
|
*log*
|
||||||
|
|
||||||
|
# Android build artifacts
|
||||||
|
/gen/android/app/build/
|
||||||
|
/gen/android/build/
|
||||||
|
/gen/android/.gradle/
|
||||||
|
/gen/android/.tauri/
|
||||||
|
/gen/android/local.properties
|
||||||
|
/gen/android/key.properties
|
||||||
|
/gen/android/keystore.properties
|
||||||
|
/gen/android/tauri.settings.gradle
|
||||||
|
/gen/android/app/src/main/jniLibs/
|
||||||
|
|||||||
50
src-tauri/Cargo.lock
generated
@@ -14,10 +14,10 @@ dependencies = [
|
|||||||
"crc",
|
"crc",
|
||||||
"csv",
|
"csv",
|
||||||
"dirs",
|
"dirs",
|
||||||
"eskin-finger-sdk",
|
|
||||||
"fern",
|
"fern",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"humantime",
|
"humantime",
|
||||||
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"ndarray",
|
"ndarray",
|
||||||
"prost",
|
"prost",
|
||||||
@@ -1153,25 +1153,6 @@ dependencies = [
|
|||||||
"windows-sys 0.61.2",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "eskin-finger-sdk"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "sparse+http://crates.huangyanjie.com/api/v1/crates/"
|
|
||||||
checksum = "341d54dbc70a0fb7cdd04162cdda6ab5735f9a4f717b1921b42c00e8afc37bb9"
|
|
||||||
dependencies = [
|
|
||||||
"chrono",
|
|
||||||
"crc",
|
|
||||||
"crossbeam-channel",
|
|
||||||
"fern",
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"serialport",
|
|
||||||
"thiserror 2.0.18",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "event-listener"
|
name = "event-listener"
|
||||||
version = "5.4.1"
|
version = "5.4.1"
|
||||||
@@ -2334,9 +2315,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.186"
|
version = "0.2.183"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
@@ -2360,26 +2341,6 @@ dependencies = [
|
|||||||
"redox_syscall 0.7.4",
|
"redox_syscall 0.7.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libudev"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"libudev-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libudev-sys"
|
|
||||||
version = "0.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"pkg-config",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@@ -4303,7 +4264,6 @@ dependencies = [
|
|||||||
"core-foundation",
|
"core-foundation",
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"io-kit-sys",
|
"io-kit-sys",
|
||||||
"libudev",
|
|
||||||
"mach2",
|
"mach2",
|
||||||
"nix 0.26.4",
|
"nix 0.26.4",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
@@ -5606,9 +5566,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.23.1"
|
version = "1.22.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"
|
checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.4.2",
|
"getrandom 0.4.2",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ crc = "3.4.0"
|
|||||||
axum = { version = "0.8", features = ["ws"] }
|
axum = { version = "0.8", features = ["ws"] }
|
||||||
tower-http = { version = "0.6", features = ["cors"] }
|
tower-http = { version = "0.6", features = ["cors"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
uuid = { version = "1.23", features = ["v4", "serde"] }
|
uuid = { version = "1", features = ["v4", "serde"] }
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
|
||||||
ndarray = { version = "0.15", optional = true }
|
ndarray = { version = "0.15", optional = true }
|
||||||
eskin-finger-sdk = { version = "0.1.0", registry = "kellnr" }
|
[target.'cfg(target_os = "android")'.dependencies]
|
||||||
|
libc = "0.2"
|
||||||
|
|
||||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||||
tauri-plugin-updater = "2"
|
tauri-plugin-updater = "2"
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
"core:window:allow-start-dragging",
|
"core:window:allow-start-dragging",
|
||||||
"opener:default",
|
"opener:default",
|
||||||
"process:default",
|
"process:default",
|
||||||
"updater:default"
|
"allow-usb-serial-list",
|
||||||
|
"allow-usb-serial-open",
|
||||||
|
"allow-usb-serial-close",
|
||||||
|
"allow-usb-serial-list-camel",
|
||||||
|
"allow-usb-serial-open-camel",
|
||||||
|
"allow-usb-serial-close-camel",
|
||||||
|
"allow-local-commands"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
12
src-tauri/gen/android/.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = false
|
||||||
20
src-tauri/gen/android/.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
||||||
|
key.properties
|
||||||
|
keystore.properties
|
||||||
|
|
||||||
|
/.tauri
|
||||||
|
/tauri.settings.gradle
|
||||||
6
src-tauri/gen/android/app/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/src/main/**/generated
|
||||||
|
/src/main/jniLibs/**/*.so
|
||||||
|
/src/main/assets/tauri.conf.json
|
||||||
|
/tauri.build.gradle.kts
|
||||||
|
/proguard-tauri.pro
|
||||||
|
/tauri.properties
|
||||||
73
src-tauri/gen/android/app/build.gradle.kts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import java.util.Properties
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
id("rust")
|
||||||
|
}
|
||||||
|
|
||||||
|
val tauriProperties = Properties().apply {
|
||||||
|
val propFile = file("tauri.properties")
|
||||||
|
if (propFile.exists()) {
|
||||||
|
propFile.inputStream().use { load(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk = 36
|
||||||
|
namespace = "com.lenn.tauri_serial"
|
||||||
|
defaultConfig {
|
||||||
|
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||||
|
applicationId = "com.lenn.tauri_serial"
|
||||||
|
minSdk = 24
|
||||||
|
targetSdk = 36
|
||||||
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||||
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
getByName("debug") {
|
||||||
|
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||||
|
isDebuggable = true
|
||||||
|
isJniDebuggable = true
|
||||||
|
isMinifyEnabled = false
|
||||||
|
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/x86/*.so")
|
||||||
|
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
*fileTree(".") { include("**/*.pro") }
|
||||||
|
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||||
|
.toList().toTypedArray()
|
||||||
|
)
|
||||||
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rust {
|
||||||
|
rootDirRel = "../../../"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation("androidx.webkit:webkit:1.14.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||||
|
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||||
|
implementation("com.google.android.material:material:1.12.0")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-process:2.10.0")
|
||||||
|
implementation("com.github.mik3y:usb-serial-for-android:3.9.0")
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||||
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(from = "tauri.build.gradle.kts")
|
||||||
BIN
src-tauri/gen/android/app/je-skin-debug.keystore
Normal file
34
src-tauri/gen/android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
|
|
||||||
|
-keepattributes RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,*Annotation*,Signature,InnerClasses,EnclosingMethod
|
||||||
|
|
||||||
|
-keep class app.tauri.annotation.** { *; }
|
||||||
|
-keep class app.tauri.plugin.** { *; }
|
||||||
|
|
||||||
|
-keep class com.lenn.tauri_serial.MainActivity { *; }
|
||||||
|
-keep class com.lenn.tauri_serial.UsbSerialPlugin { *; }
|
||||||
|
-keepclassmembers class com.lenn.tauri_serial.UsbSerialPlugin {
|
||||||
|
public *;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class com.hoho.android.usbserial.** { *; }
|
||||||
47
src-tauri/gen/android/app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<!-- USB Host support for serial devices -->
|
||||||
|
<uses-feature android:name="android.hardware.usb.host" android:required="true" />
|
||||||
|
|
||||||
|
<!-- AndroidTV support -->
|
||||||
|
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/Theme.je_skin"
|
||||||
|
android:usesCleartextTraffic="${usesCleartextTraffic}">
|
||||||
|
<activity
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:label="@string/main_activity_title"
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
<!-- AndroidTV support -->
|
||||||
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
<!-- Auto-launch when USB device is attached -->
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data
|
||||||
|
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||||
|
android:resource="@xml/usb_device_filter" />
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.lenn.tauri_serial
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
|
|
||||||
|
class MainActivity : TauriActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
enableEdgeToEdge()
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,388 @@
|
|||||||
|
package com.lenn.tauri_serial
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.app.PendingIntent
|
||||||
|
import android.content.BroadcastReceiver
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.content.IntentFilter
|
||||||
|
import android.hardware.usb.UsbDevice
|
||||||
|
import android.hardware.usb.UsbDeviceConnection
|
||||||
|
import android.hardware.usb.UsbManager
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.ParcelFileDescriptor
|
||||||
|
import android.system.Os
|
||||||
|
import android.system.OsConstants
|
||||||
|
import app.tauri.annotation.Command
|
||||||
|
import app.tauri.annotation.TauriPlugin
|
||||||
|
import app.tauri.plugin.Invoke
|
||||||
|
import app.tauri.plugin.JSObject
|
||||||
|
import app.tauri.plugin.Plugin
|
||||||
|
import com.hoho.android.usbserial.driver.UsbSerialDriver
|
||||||
|
import com.hoho.android.usbserial.driver.UsbSerialPort
|
||||||
|
import com.hoho.android.usbserial.driver.UsbSerialProber
|
||||||
|
import java.io.FileDescriptor
|
||||||
|
import java.io.FileInputStream
|
||||||
|
import java.io.FileOutputStream
|
||||||
|
import java.io.IOException
|
||||||
|
import java.util.concurrent.atomic.AtomicBoolean
|
||||||
|
import org.json.JSONArray
|
||||||
|
|
||||||
|
@TauriPlugin
|
||||||
|
class UsbSerialPlugin(private val activity: Activity) : Plugin(activity) {
|
||||||
|
companion object {
|
||||||
|
private const val ACTION_USB_PERMISSION = "com.lenn.tauri_serial.USB_PERMISSION"
|
||||||
|
private const val BAUD_RATE = 921600
|
||||||
|
private const val READ_TIMEOUT_MS = 100
|
||||||
|
private const val WRITE_TIMEOUT_MS = 100
|
||||||
|
}
|
||||||
|
|
||||||
|
private var pendingConnectInvoke: Invoke? = null
|
||||||
|
private var pendingConnectDeviceName: String? = null
|
||||||
|
private var activeBridge: SerialBridge? = null
|
||||||
|
|
||||||
|
private val usbPermissionReceiver = object : BroadcastReceiver() {
|
||||||
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
|
if (ACTION_USB_PERMISSION != intent.action) return
|
||||||
|
|
||||||
|
synchronized(this@UsbSerialPlugin) {
|
||||||
|
val device = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
intent.getParcelableExtra(UsbManager.EXTRA_DEVICE, UsbDevice::class.java)
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
intent.getParcelableExtra(UsbManager.EXTRA_DEVICE)
|
||||||
|
}
|
||||||
|
|
||||||
|
val granted = intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)
|
||||||
|
val invoke = pendingConnectInvoke
|
||||||
|
val targetDeviceName = pendingConnectDeviceName
|
||||||
|
|
||||||
|
pendingConnectInvoke = null
|
||||||
|
pendingConnectDeviceName = null
|
||||||
|
|
||||||
|
if (invoke == null || device == null) return
|
||||||
|
|
||||||
|
if (!granted) {
|
||||||
|
invoke.reject("USB permission denied")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetDeviceName != null && device.deviceName == targetDeviceName) {
|
||||||
|
openAndReturn(invoke, device.deviceName)
|
||||||
|
} else {
|
||||||
|
invoke.reject("USB device mismatch")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun load(webView: android.webkit.WebView) {
|
||||||
|
super.load(webView)
|
||||||
|
val filter = IntentFilter(ACTION_USB_PERMISSION)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
activity.applicationContext.registerReceiver(
|
||||||
|
usbPermissionReceiver,
|
||||||
|
filter,
|
||||||
|
Context.RECEIVER_NOT_EXPORTED
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
activity.applicationContext.registerReceiver(usbPermissionReceiver, filter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
activeBridge?.close()
|
||||||
|
activeBridge = null
|
||||||
|
try {
|
||||||
|
activity.applicationContext.unregisterReceiver(usbPermissionReceiver)
|
||||||
|
} catch (_: Exception) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usb_serial_list(invoke: Invoke) {
|
||||||
|
listDevices(invoke)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usbSerialList(invoke: Invoke) {
|
||||||
|
listDevices(invoke)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun listDevices(invoke: Invoke) {
|
||||||
|
val usbManager = activity.getSystemService(Context.USB_SERVICE) as? UsbManager
|
||||||
|
if (usbManager == null) {
|
||||||
|
invoke.reject("USB service not available")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val result = JSObject()
|
||||||
|
val serialDevices = JSONArray()
|
||||||
|
|
||||||
|
for (driver in UsbSerialProber.getDefaultProber().findAllDrivers(usbManager)) {
|
||||||
|
val device = driver.device
|
||||||
|
val obj = JSObject()
|
||||||
|
obj.put("name", device.deviceName)
|
||||||
|
obj.put("vendorId", device.vendorId)
|
||||||
|
obj.put("productId", device.productId)
|
||||||
|
obj.put("manufacturer", safeDeviceString { device.manufacturerName })
|
||||||
|
obj.put("product", safeDeviceString { device.productName })
|
||||||
|
obj.put("serial", safeDeviceString { device.serialNumber })
|
||||||
|
obj.put("hasPermission", usbManager.hasPermission(device))
|
||||||
|
serialDevices.put(obj)
|
||||||
|
}
|
||||||
|
|
||||||
|
result.put("devices", serialDevices)
|
||||||
|
invoke.resolve(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usb_serial_open(invoke: Invoke) {
|
||||||
|
openDevice(invoke)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usbSerialOpen(invoke: Invoke) {
|
||||||
|
openDevice(invoke)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun openDevice(invoke: Invoke) {
|
||||||
|
val args = invoke.parseArgs(JSObject::class.java)
|
||||||
|
val deviceName = args.optString("name", "")
|
||||||
|
val vendorId = if (args.has("vendorId")) args.optInt("vendorId") else null
|
||||||
|
val productId = if (args.has("productId")) args.optInt("productId") else null
|
||||||
|
|
||||||
|
val usbManager = activity.getSystemService(Context.USB_SERVICE) as? UsbManager
|
||||||
|
if (usbManager == null) {
|
||||||
|
invoke.reject("USB service not available")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val device = resolveDevice(usbManager, deviceName, vendorId, productId)
|
||||||
|
if (device == null) {
|
||||||
|
val available = usbManager.deviceList.values.joinToString(", ") { it.deviceName }
|
||||||
|
invoke.reject("USB device not found: $deviceName; available: $available")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!usbManager.hasPermission(device)) {
|
||||||
|
synchronized(this) {
|
||||||
|
pendingConnectInvoke = invoke
|
||||||
|
pendingConnectDeviceName = device.deviceName
|
||||||
|
}
|
||||||
|
|
||||||
|
val flags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||||
|
} else {
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT
|
||||||
|
}
|
||||||
|
val permissionRequest = Intent(ACTION_USB_PERMISSION).setPackage(activity.packageName)
|
||||||
|
val permissionIntent = PendingIntent.getBroadcast(
|
||||||
|
activity,
|
||||||
|
0,
|
||||||
|
permissionRequest,
|
||||||
|
flags
|
||||||
|
)
|
||||||
|
usbManager.requestPermission(device, permissionIntent)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
openAndReturn(invoke, device.deviceName)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usb_serial_close(invoke: Invoke) {
|
||||||
|
closeBridge()
|
||||||
|
invoke.resolve(JSObject())
|
||||||
|
}
|
||||||
|
|
||||||
|
@Command
|
||||||
|
fun usbSerialClose(invoke: Invoke) {
|
||||||
|
closeBridge()
|
||||||
|
invoke.resolve(JSObject())
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun closeBridge() {
|
||||||
|
activeBridge?.close()
|
||||||
|
activeBridge = null
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun openAndReturn(invoke: Invoke, deviceName: String) {
|
||||||
|
val usbManager = activity.getSystemService(Context.USB_SERVICE) as? UsbManager
|
||||||
|
if (usbManager == null) {
|
||||||
|
invoke.reject("USB service not available")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val driver = findDriver(usbManager, deviceName)
|
||||||
|
if (driver == null) {
|
||||||
|
invoke.reject("USB serial driver not found: $deviceName")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val connection = usbManager.openDevice(driver.device)
|
||||||
|
if (connection == null) {
|
||||||
|
invoke.reject("Failed to open USB device")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val port = driver.ports.firstOrNull()
|
||||||
|
if (port == null) {
|
||||||
|
connection.close()
|
||||||
|
invoke.reject("No serial port found on USB device")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
port.open(connection)
|
||||||
|
port.setParameters(
|
||||||
|
BAUD_RATE,
|
||||||
|
UsbSerialPort.DATABITS_8,
|
||||||
|
UsbSerialPort.STOPBITS_1,
|
||||||
|
UsbSerialPort.PARITY_NONE
|
||||||
|
)
|
||||||
|
|
||||||
|
val rustSide = FileDescriptor()
|
||||||
|
val bridgeSide = FileDescriptor()
|
||||||
|
Os.socketpair(OsConstants.AF_UNIX, OsConstants.SOCK_STREAM, 0, rustSide, bridgeSide)
|
||||||
|
val rustFd = ParcelFileDescriptor.dup(rustSide).detachFd()
|
||||||
|
Os.close(rustSide)
|
||||||
|
|
||||||
|
activeBridge?.close()
|
||||||
|
activeBridge = SerialBridge(bridgeSide, port, connection).also { it.start() }
|
||||||
|
|
||||||
|
val result = JSObject()
|
||||||
|
result.put("fd", rustFd)
|
||||||
|
result.put("name", driver.device.deviceName)
|
||||||
|
result.put("vendorId", driver.device.vendorId)
|
||||||
|
result.put("productId", driver.device.productId)
|
||||||
|
invoke.resolve(result)
|
||||||
|
} catch (error: Exception) {
|
||||||
|
try {
|
||||||
|
port.close()
|
||||||
|
} catch (_: Exception) {
|
||||||
|
}
|
||||||
|
connection.close()
|
||||||
|
invoke.reject(error.message ?: "Failed to open USB serial port")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun findDriver(usbManager: UsbManager, deviceName: String): UsbSerialDriver? {
|
||||||
|
return UsbSerialProber.getDefaultProber()
|
||||||
|
.findAllDrivers(usbManager)
|
||||||
|
.firstOrNull { it.device.deviceName == deviceName || it.device.deviceName.equals(deviceName, ignoreCase = true) }
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun resolveDevice(
|
||||||
|
usbManager: UsbManager,
|
||||||
|
deviceName: String,
|
||||||
|
vendorId: Int?,
|
||||||
|
productId: Int?
|
||||||
|
): UsbDevice? {
|
||||||
|
usbManager.deviceList[deviceName]?.let { return it }
|
||||||
|
|
||||||
|
val devices = usbManager.deviceList.values.toList()
|
||||||
|
devices.firstOrNull { it.deviceName.equals(deviceName, ignoreCase = true) }?.let { return it }
|
||||||
|
|
||||||
|
if (vendorId != null && productId != null) {
|
||||||
|
devices.firstOrNull { it.vendorId == vendorId && it.productId == productId }?.let { return it }
|
||||||
|
}
|
||||||
|
|
||||||
|
val drivers = UsbSerialProber.getDefaultProber().findAllDrivers(usbManager)
|
||||||
|
drivers.firstOrNull {
|
||||||
|
it.device.deviceName == deviceName || it.device.deviceName.equals(deviceName, ignoreCase = true)
|
||||||
|
}?.device?.let { return it }
|
||||||
|
|
||||||
|
if (drivers.size == 1) {
|
||||||
|
return drivers.first().device
|
||||||
|
}
|
||||||
|
|
||||||
|
if (devices.size == 1) {
|
||||||
|
return devices.first()
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun safeDeviceString(read: () -> String?): String {
|
||||||
|
return try {
|
||||||
|
read() ?: ""
|
||||||
|
} catch (_: SecurityException) {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class SerialBridge(
|
||||||
|
private val bridgeFd: FileDescriptor,
|
||||||
|
private val port: UsbSerialPort,
|
||||||
|
private val connection: UsbDeviceConnection
|
||||||
|
) {
|
||||||
|
private val running = AtomicBoolean(false)
|
||||||
|
private lateinit var serialToRustThread: Thread
|
||||||
|
private lateinit var rustToSerialThread: Thread
|
||||||
|
|
||||||
|
fun start() {
|
||||||
|
running.set(true)
|
||||||
|
serialToRustThread = Thread(::copySerialToRust, "JE-Skin-usb-serial-rx")
|
||||||
|
rustToSerialThread = Thread(::copyRustToSerial, "JE-Skin-usb-serial-tx")
|
||||||
|
serialToRustThread.start()
|
||||||
|
rustToSerialThread.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun close() {
|
||||||
|
if (!running.getAndSet(false)) return
|
||||||
|
|
||||||
|
try {
|
||||||
|
Os.close(bridgeFd)
|
||||||
|
} catch (_: Exception) {
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
port.close()
|
||||||
|
} catch (_: Exception) {
|
||||||
|
}
|
||||||
|
connection.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun copySerialToRust() {
|
||||||
|
val output = FileOutputStream(bridgeFd)
|
||||||
|
val buffer = ByteArray(4096)
|
||||||
|
|
||||||
|
while (running.get()) {
|
||||||
|
try {
|
||||||
|
val count = port.read(buffer, READ_TIMEOUT_MS)
|
||||||
|
if (count > 0) {
|
||||||
|
output.write(buffer, 0, count)
|
||||||
|
output.flush()
|
||||||
|
}
|
||||||
|
} catch (_: IOException) {
|
||||||
|
close()
|
||||||
|
} catch (_: Exception) {
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun copyRustToSerial() {
|
||||||
|
val input = FileInputStream(bridgeFd)
|
||||||
|
val buffer = ByteArray(4096)
|
||||||
|
|
||||||
|
while (running.get()) {
|
||||||
|
try {
|
||||||
|
val count = input.read(buffer)
|
||||||
|
if (count < 0) {
|
||||||
|
close()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (count > 0) {
|
||||||
|
port.write(buffer.copyOf(count), WRITE_TIMEOUT_MS)
|
||||||
|
}
|
||||||
|
} catch (_: IOException) {
|
||||||
|
close()
|
||||||
|
} catch (_: Exception) {
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="85.84757"
|
||||||
|
android:endY="92.4963"
|
||||||
|
android:startX="42.9492"
|
||||||
|
android:startY="49.59793"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hello World!"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.je_skin" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
10
src-tauri/gen/android/app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
|
<color name="purple_500">#FF6200EE</color>
|
||||||
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
<color name="teal_200">#FF03DAC5</color>
|
||||||
|
<color name="teal_700">#FF018786</color>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">JE-Skin</string>
|
||||||
|
<string name="main_activity_title">JE-Skin</string>
|
||||||
|
</resources>
|
||||||
6
src-tauri/gen/android/app/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.je_skin" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<external-path name="my_images" path="." />
|
||||||
|
<cache-path name="my_cache_images" path="." />
|
||||||
|
</paths>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- CH340 / CH341 USB-Serial -->
|
||||||
|
<usb-device vendor-id="1a86" product-id="7523" />
|
||||||
|
<!-- CP2102 / CP2104 -->
|
||||||
|
<usb-device vendor-id="10c4" product-id="ea60" />
|
||||||
|
<usb-device vendor-id="10c4" product-id="ea70" />
|
||||||
|
<!-- FTDI FT232R / FT232H -->
|
||||||
|
<usb-device vendor-id="0403" product-id="6001" />
|
||||||
|
<usb-device vendor-id="0403" product-id="6014" />
|
||||||
|
<!-- PL2303 -->
|
||||||
|
<usb-device vendor-id="067b" product-id="2303" />
|
||||||
|
<usb-device vendor-id="067b" product-id="23a3" />
|
||||||
|
<!-- CDC ACM (generic USB serial) -->
|
||||||
|
<usb-device vendor-id="2341" product-id="0001" />
|
||||||
|
<usb-device vendor-id="2341" product-id="0043" />
|
||||||
|
<usb-device vendor-id="2341" product-id="0042" />
|
||||||
|
<!-- Allow any USB device (catch-all) -->
|
||||||
|
<usb-device />
|
||||||
|
</resources>
|
||||||
22
src-tauri/gen/android/build.gradle.kts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("com.android.tools.build:gradle:8.11.0")
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
maven(url = "https://jitpack.io")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("clean").configure {
|
||||||
|
delete("build")
|
||||||
|
}
|
||||||
23
src-tauri/gen/android/buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
gradlePlugin {
|
||||||
|
plugins {
|
||||||
|
create("pluginsForCoolKids") {
|
||||||
|
id = "rust"
|
||||||
|
implementationClass = "RustPlugin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(gradleApi())
|
||||||
|
implementation("com.android.tools.build:gradle:8.11.0")
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
import java.io.File
|
||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
import org.gradle.api.DefaultTask
|
||||||
|
import org.gradle.api.GradleException
|
||||||
|
import org.gradle.api.logging.LogLevel
|
||||||
|
import org.gradle.api.tasks.Input
|
||||||
|
import org.gradle.api.tasks.TaskAction
|
||||||
|
|
||||||
|
open class BuildTask : DefaultTask() {
|
||||||
|
@Input
|
||||||
|
var rootDirRel: String? = null
|
||||||
|
@Input
|
||||||
|
var target: String? = null
|
||||||
|
@Input
|
||||||
|
var release: Boolean? = null
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun assemble() {
|
||||||
|
val executable = """cargo""";
|
||||||
|
try {
|
||||||
|
runTauriCli(executable)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
|
// Try different Windows-specific extensions
|
||||||
|
val fallbacks = listOf(
|
||||||
|
"$executable.exe",
|
||||||
|
"$executable.cmd",
|
||||||
|
"$executable.bat",
|
||||||
|
)
|
||||||
|
|
||||||
|
var lastException: Exception = e
|
||||||
|
for (fallback in fallbacks) {
|
||||||
|
try {
|
||||||
|
runTauriCli(fallback)
|
||||||
|
return
|
||||||
|
} catch (fallbackException: Exception) {
|
||||||
|
lastException = fallbackException
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw lastException
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun runTauriCli(executable: String) {
|
||||||
|
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||||
|
val target = target ?: throw GradleException("target cannot be null")
|
||||||
|
val release = release ?: throw GradleException("release cannot be null")
|
||||||
|
val args = listOf("tauri", "android", "android-studio-script");
|
||||||
|
|
||||||
|
project.exec {
|
||||||
|
workingDir(File(project.projectDir, rootDirRel))
|
||||||
|
executable(executable)
|
||||||
|
args(args)
|
||||||
|
if (project.logger.isEnabled(LogLevel.DEBUG)) {
|
||||||
|
args("-vv")
|
||||||
|
} else if (project.logger.isEnabled(LogLevel.INFO)) {
|
||||||
|
args("-v")
|
||||||
|
}
|
||||||
|
if (release) {
|
||||||
|
args("--release")
|
||||||
|
}
|
||||||
|
args(listOf("--target", target))
|
||||||
|
}.assertNormalExitValue()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
|
import org.gradle.api.DefaultTask
|
||||||
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.kotlin.dsl.configure
|
||||||
|
import org.gradle.kotlin.dsl.get
|
||||||
|
|
||||||
|
const val TASK_GROUP = "rust"
|
||||||
|
|
||||||
|
open class Config {
|
||||||
|
lateinit var rootDirRel: String
|
||||||
|
}
|
||||||
|
|
||||||
|
open class RustPlugin : Plugin<Project> {
|
||||||
|
private lateinit var config: Config
|
||||||
|
|
||||||
|
override fun apply(project: Project) = with(project) {
|
||||||
|
config = extensions.create("rust", Config::class.java)
|
||||||
|
|
||||||
|
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
|
||||||
|
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
|
||||||
|
|
||||||
|
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
|
||||||
|
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
|
||||||
|
|
||||||
|
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
|
||||||
|
|
||||||
|
extensions.configure<ApplicationExtension> {
|
||||||
|
@Suppress("UnstableApiUsage")
|
||||||
|
flavorDimensions.add("abi")
|
||||||
|
productFlavors {
|
||||||
|
create("universal") {
|
||||||
|
dimension = "abi"
|
||||||
|
ndk {
|
||||||
|
abiFilters += abiList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defaultArchList.forEachIndexed { index, arch ->
|
||||||
|
create(arch) {
|
||||||
|
dimension = "abi"
|
||||||
|
ndk {
|
||||||
|
abiFilters.add(defaultAbiList[index])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
for (profile in listOf("debug", "release")) {
|
||||||
|
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
|
||||||
|
val buildTask = tasks.maybeCreate(
|
||||||
|
"rustBuildUniversal$profileCapitalized",
|
||||||
|
DefaultTask::class.java
|
||||||
|
).apply {
|
||||||
|
group = TASK_GROUP
|
||||||
|
description = "Build dynamic library in $profile mode for all targets"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
|
||||||
|
|
||||||
|
for (targetPair in targetsList.withIndex()) {
|
||||||
|
val targetName = targetPair.value
|
||||||
|
val targetArch = archList[targetPair.index]
|
||||||
|
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
|
||||||
|
val targetBuildTask = project.tasks.maybeCreate(
|
||||||
|
"rustBuild$targetArchCapitalized$profileCapitalized",
|
||||||
|
BuildTask::class.java
|
||||||
|
).apply {
|
||||||
|
group = TASK_GROUP
|
||||||
|
description = "Build dynamic library in $profile mode for $targetArch"
|
||||||
|
rootDirRel = config.rootDirRel
|
||||||
|
target = targetName
|
||||||
|
release = profile == "release"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTask.dependsOn(targetBuildTask)
|
||||||
|
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
|
||||||
|
targetBuildTask
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src-tauri/gen/android/gradle.properties
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||||
|
# Android operating system, and which are packaged with your app"s APK
|
||||||
|
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||||
|
android.useAndroidX=true
|
||||||
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
|
kotlin.code.style=official
|
||||||
|
# Enables namespacing of each library's R class so that its R class includes only the
|
||||||
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
|
# thereby reducing the size of the R class for that library
|
||||||
|
android.nonTransitiveRClass=true
|
||||||
|
android.nonFinalResIds=false
|
||||||
BIN
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#Tue May 10 19:22:52 CST 2022
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
185
src-tauri/gen/android/gradlew
vendored
Executable file
@@ -0,0 +1,185 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright 2015 the original author or authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
89
src-tauri/gen/android/gradlew.bat
vendored
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
3
src-tauri/gen/android/settings.gradle
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
include ':app'
|
||||||
|
|
||||||
|
apply from: 'tauri.settings.gradle'
|
||||||
66
src-tauri/permissions/usb-serial/default.toml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
[default]
|
||||||
|
description = "Allows Android USB serial plugin commands."
|
||||||
|
permissions = [
|
||||||
|
"allow-usb-serial-list",
|
||||||
|
"allow-usb-serial-open",
|
||||||
|
"allow-usb-serial-close",
|
||||||
|
"allow-usb-serial-list-camel",
|
||||||
|
"allow-usb-serial-open-camel",
|
||||||
|
"allow-usb-serial-close-camel",
|
||||||
|
"allow-local-commands"
|
||||||
|
]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-list"
|
||||||
|
description = "Allows listing Android USB serial devices."
|
||||||
|
commands.allow = ["plugin:usb-serial|usb_serial_list"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-open"
|
||||||
|
description = "Allows opening Android USB serial devices."
|
||||||
|
commands.allow = ["plugin:usb-serial|usb_serial_open"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-close"
|
||||||
|
description = "Allows closing Android USB serial devices."
|
||||||
|
commands.allow = ["plugin:usb-serial|usb_serial_close"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-list-camel"
|
||||||
|
description = "Allows listing Android USB serial devices via camelCase command."
|
||||||
|
commands.allow = ["plugin:usb-serial|usbSerialList"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-open-camel"
|
||||||
|
description = "Allows opening Android USB serial devices via camelCase command."
|
||||||
|
commands.allow = ["plugin:usb-serial|usbSerialOpen"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-usb-serial-close-camel"
|
||||||
|
description = "Allows closing Android USB serial devices via camelCase command."
|
||||||
|
commands.allow = ["plugin:usb-serial|usbSerialClose"]
|
||||||
|
|
||||||
|
[[permission]]
|
||||||
|
identifier = "allow-local-commands"
|
||||||
|
description = "Allows application commands used by the Android frontend."
|
||||||
|
commands.allow = [
|
||||||
|
"file_explorer_list",
|
||||||
|
"serial_enum",
|
||||||
|
"serial_connect",
|
||||||
|
"serial_connect_fd",
|
||||||
|
"serial_disconnect",
|
||||||
|
"serial_export_csv",
|
||||||
|
"serial_has_record_data",
|
||||||
|
"serial_export_csv_to_path",
|
||||||
|
"serial_import_csv",
|
||||||
|
"serial_import_csv_from_path",
|
||||||
|
"win_minimize",
|
||||||
|
"win_toggle_maximize",
|
||||||
|
"win_close",
|
||||||
|
"devkit_status",
|
||||||
|
"devkit_start",
|
||||||
|
"devkit_stop",
|
||||||
|
"devkit_get_config",
|
||||||
|
"devkit_set_config",
|
||||||
|
"devkit_process_export"
|
||||||
|
]
|
||||||
9
src-tauri/plugins/usb-serial-plugin.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"usb-serial": {
|
||||||
|
"android": {
|
||||||
|
"package": "com.lenn.tauri_serial.UsbSerialPlugin"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
{
|
|
||||||
"scaler_mean": [
|
|
||||||
1748.7541486595198,
|
|
||||||
1292.5704664084863,
|
|
||||||
669.8700117864961,
|
|
||||||
1617.8798712839798,
|
|
||||||
2104.589811228976,
|
|
||||||
3267.658809002638,
|
|
||||||
3366.4000112252343,
|
|
||||||
2660.981740285495,
|
|
||||||
2656.615909898786,
|
|
||||||
1747.1196048717518,
|
|
||||||
3093.4178032216423,
|
|
||||||
3107.599371386878,
|
|
||||||
4138.929019101607,
|
|
||||||
3778.3928270752654,
|
|
||||||
3495.851920450506,
|
|
||||||
3110.5580063983834,
|
|
||||||
2310.8518456156107,
|
|
||||||
2899.8918261585377,
|
|
||||||
3286.6881442816784,
|
|
||||||
3601.237076948981,
|
|
||||||
2590.9553048586554,
|
|
||||||
2555.2781425978933,
|
|
||||||
2004.8764850049579,
|
|
||||||
1333.8961665824775,
|
|
||||||
2090.217507623805,
|
|
||||||
0.363302046990876,
|
|
||||||
0.2506597877765041,
|
|
||||||
0.12741811820991292,
|
|
||||||
0.32195020821212794,
|
|
||||||
0.43317540002685884,
|
|
||||||
0.7725988160553472,
|
|
||||||
0.791227193907261,
|
|
||||||
0.5957799875116326,
|
|
||||||
0.5873844015441929,
|
|
||||||
0.35855586659016336,
|
|
||||||
0.7267512979672636,
|
|
||||||
0.7214172326166498,
|
|
||||||
1.0,
|
|
||||||
0.9089476753706724,
|
|
||||||
0.8226695360434777,
|
|
||||||
0.7208819781157673,
|
|
||||||
0.5152795489332506,
|
|
||||||
0.6711736481838434,
|
|
||||||
0.7782925265622518,
|
|
||||||
0.8648282061576593,
|
|
||||||
0.5787625095682526,
|
|
||||||
0.5752349727514727,
|
|
||||||
0.43456864805018935,
|
|
||||||
0.27668525082454587,
|
|
||||||
0.47414670304783574,
|
|
||||||
4138.929019101607,
|
|
||||||
64531.08183195824,
|
|
||||||
175620.92531477427,
|
|
||||||
22.847729696357412,
|
|
||||||
14.671691561018095,
|
|
||||||
0.07533558084489102,
|
|
||||||
12446.865764906175,
|
|
||||||
47945.287047950456,
|
|
||||||
2.8973185436828195,
|
|
||||||
10.774373017335268,
|
|
||||||
3.472192991899253,
|
|
||||||
-0.013941562889309035,
|
|
||||||
0.09672681097411825,
|
|
||||||
0.5067195499928454,
|
|
||||||
0.755407246398865,
|
|
||||||
0.03711810817384146,
|
|
||||||
11.154421806888552,
|
|
||||||
64500.8986854629
|
|
||||||
],
|
|
||||||
"scaler_scale": [
|
|
||||||
1458.5456651154973,
|
|
||||||
1319.8585484401115,
|
|
||||||
798.8535944732339,
|
|
||||||
1467.8233720347457,
|
|
||||||
1637.8964913406842,
|
|
||||||
1330.3349975112737,
|
|
||||||
1391.430499849884,
|
|
||||||
1444.166940848846,
|
|
||||||
1630.948040054198,
|
|
||||||
1406.2203759964518,
|
|
||||||
1289.9699402243327,
|
|
||||||
1442.0533616965101,
|
|
||||||
1437.7214049715994,
|
|
||||||
1393.522474091575,
|
|
||||||
1468.6421185157626,
|
|
||||||
1449.3479990930084,
|
|
||||||
1293.2464048717598,
|
|
||||||
1331.2560392843097,
|
|
||||||
1326.1289536453178,
|
|
||||||
1357.3405110533047,
|
|
||||||
1452.4854193036483,
|
|
||||||
1348.4425883366337,
|
|
||||||
1318.1429721243371,
|
|
||||||
1059.93845215709,
|
|
||||||
1114.1647557935548,
|
|
||||||
0.2395898634701691,
|
|
||||||
0.21706962815914935,
|
|
||||||
0.13523106483202163,
|
|
||||||
0.23880331588910964,
|
|
||||||
0.24830003478347082,
|
|
||||||
0.1464527498295455,
|
|
||||||
0.15391677914992113,
|
|
||||||
0.18125664726966026,
|
|
||||||
0.2326879002599809,
|
|
||||||
0.23502163992653513,
|
|
||||||
0.13026800431597335,
|
|
||||||
0.15563022147466685,
|
|
||||||
1.0,
|
|
||||||
0.09922737602626737,
|
|
||||||
0.18291931318098986,
|
|
||||||
0.15401181704844932,
|
|
||||||
0.2143892844194339,
|
|
||||||
0.16856049162074294,
|
|
||||||
0.15902500893917185,
|
|
||||||
0.18285009098439925,
|
|
||||||
0.17264751056304276,
|
|
||||||
0.21090366624550771,
|
|
||||||
0.16802111677577075,
|
|
||||||
0.19264329284433157,
|
|
||||||
0.19589977001187556,
|
|
||||||
1437.7214049715994,
|
|
||||||
32602.413979370118,
|
|
||||||
95845.11969895993,
|
|
||||||
3.426376344472427,
|
|
||||||
3.408382770733738,
|
|
||||||
0.033353666248921464,
|
|
||||||
5505.629576226806,
|
|
||||||
25703.01200969283,
|
|
||||||
0.4599551450527747,
|
|
||||||
2.978321440052941,
|
|
||||||
0.3916581766443181,
|
|
||||||
0.06096090153067211,
|
|
||||||
0.07864618660494935,
|
|
||||||
0.0344984508436715,
|
|
||||||
0.17668176728315207,
|
|
||||||
0.18905119470509504,
|
|
||||||
5352.30503788098,
|
|
||||||
32297.31796957845
|
|
||||||
],
|
|
||||||
"ridge_coef": [
|
|
||||||
7.4424310127566695,
|
|
||||||
13.345966730219576,
|
|
||||||
2.351840055857306,
|
|
||||||
6.088230738742203,
|
|
||||||
-10.030964629299273,
|
|
||||||
3.876136979406362,
|
|
||||||
-11.251608537526174,
|
|
||||||
16.84502390958064,
|
|
||||||
-2.093552796584439,
|
|
||||||
-5.784923711493545,
|
|
||||||
-6.67830546424787,
|
|
||||||
-4.654052249161928,
|
|
||||||
6.038218458133514,
|
|
||||||
9.82412450487401,
|
|
||||||
-6.200667839175651,
|
|
||||||
-0.3133364534713342,
|
|
||||||
-8.75036029102127,
|
|
||||||
12.785901861589027,
|
|
||||||
-3.7296377182327123,
|
|
||||||
6.546167384121816,
|
|
||||||
-4.984129287282208,
|
|
||||||
8.311396481777527,
|
|
||||||
-0.6248790895663127,
|
|
||||||
2.69008779623183,
|
|
||||||
12.996047839696784,
|
|
||||||
-2.2609944767610504,
|
|
||||||
-5.131537716982507,
|
|
||||||
0.3988922195665723,
|
|
||||||
-5.197736884253156,
|
|
||||||
4.556854888903703,
|
|
||||||
-0.8642438099006351,
|
|
||||||
6.327731485629085,
|
|
||||||
-5.157281763422745,
|
|
||||||
0.10691827520622764,
|
|
||||||
4.656962972053113,
|
|
||||||
3.2628870750114887,
|
|
||||||
4.033159141354671,
|
|
||||||
0.0,
|
|
||||||
-2.9206404009765268,
|
|
||||||
1.8683691849941264,
|
|
||||||
2.408006875407745,
|
|
||||||
7.250310827671452,
|
|
||||||
-3.97015207422554,
|
|
||||||
0.7316093212194048,
|
|
||||||
-3.459346094204882,
|
|
||||||
2.4407660203169255,
|
|
||||||
-2.872982666400644,
|
|
||||||
1.8797071977799857,
|
|
||||||
-1.3374700235689694,
|
|
||||||
-7.9533345474852295,
|
|
||||||
6.038063637368508,
|
|
||||||
1.615806581558555,
|
|
||||||
95785.62883805836,
|
|
||||||
0.12233606167692031,
|
|
||||||
-0.1515900264871255,
|
|
||||||
2.2023033069961873,
|
|
||||||
8.776787743985668,
|
|
||||||
-0.16714060634667535,
|
|
||||||
-2.751671223554021,
|
|
||||||
0.2511944267079865,
|
|
||||||
6.13561607395193,
|
|
||||||
2.85703108671782,
|
|
||||||
-0.11255626089468472,
|
|
||||||
-0.9017242341101542,
|
|
||||||
-0.627291200283328,
|
|
||||||
3.4664885582435883,
|
|
||||||
0.02591345630626686,
|
|
||||||
0.5530407299425606
|
|
||||||
],
|
|
||||||
"ridge_intercept": 175620.9253147744,
|
|
||||||
"n_features": 68,
|
|
||||||
"noise_threshold": 15.0,
|
|
||||||
"contact_threshold": 20.0,
|
|
||||||
"ema_alpha": 0.9
|
|
||||||
}
|
|
||||||
@@ -141,6 +141,7 @@ fn resolve_start_path(app: &AppHandle, raw_path: Option<String>) -> Result<PathB
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn resolve_default_path(app: &AppHandle) -> Result<PathBuf, String> {
|
fn resolve_default_path(app: &AppHandle) -> Result<PathBuf, String> {
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
if let Ok(path) = app.path().desktop_dir() {
|
if let Ok(path) = app.path().desktop_dir() {
|
||||||
return Ok(path);
|
return Ok(path);
|
||||||
}
|
}
|
||||||
@@ -175,6 +176,7 @@ fn collect_roots(app: &AppHandle) -> Vec<FileExplorerRoot> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
if let Ok(path) = app.path().desktop_dir() {
|
if let Ok(path) = app.path().desktop_dir() {
|
||||||
push_root("Desktop", path);
|
push_root("Desktop", path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
||||||
use tauri::{async_runtime::JoinHandle, AppHandle, Manager, State};
|
use tauri::{async_runtime::JoinHandle, AppHandle, Manager, State};
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
use tokio_serial::{available_ports, SerialPortBuilderExt};
|
use tokio_serial::{available_ports, SerialPortBuilderExt};
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
|
|
||||||
@@ -113,6 +114,13 @@ pub async fn shutdown_active_session(
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn serial_enum() -> Result<Vec<String>, SerialError> {
|
pub fn serial_enum() -> Result<Vec<String>, SerialError> {
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
{
|
||||||
|
Ok(Vec::new())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
|
{
|
||||||
let ports = available_ports()
|
let ports = available_ports()
|
||||||
.map_err(|_| SerialError::ScanError)?
|
.map_err(|_| SerialError::ScanError)?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
@@ -128,7 +136,9 @@ pub fn serial_enum() -> Result<Vec<String>, SerialError> {
|
|||||||
|
|
||||||
Ok(ports)
|
Ok(ports)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn serial_connect(
|
pub async fn serial_connect(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
@@ -246,15 +256,122 @@ pub async fn serial_disconnect(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
#[tauri::command]
|
||||||
|
pub async fn serial_connect_fd(
|
||||||
|
app: AppHandle,
|
||||||
|
fd: i32,
|
||||||
|
device_name: String,
|
||||||
|
state: State<'_, SerialConnectionState>,
|
||||||
|
) -> Result<SerialConnectResponse, SerialError> {
|
||||||
|
if fd < 0 {
|
||||||
|
return Err(SerialError::InvalidConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
let session = state.session.lock().map_err(|_| SerialError::StateError)?;
|
||||||
|
if session.is_some() {
|
||||||
|
return Err(SerialError::AlreadyConnected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let cancel = CancellationToken::new();
|
||||||
|
let current_record = Arc::new(Mutex::new(TactileARecording::new()));
|
||||||
|
let task_record = current_record.clone();
|
||||||
|
let task_cancel = cancel.clone();
|
||||||
|
let task_app = app.clone();
|
||||||
|
let task_port_name = device_name.clone();
|
||||||
|
|
||||||
|
let port = crate::serial_core::raw_fd_stream::RawFdStream::new(fd)
|
||||||
|
.map_err(|_| SerialError::OpenError)?;
|
||||||
|
let session_started_at = Instant::now();
|
||||||
|
|
||||||
|
let task = tauri::async_runtime::spawn(async move {
|
||||||
|
let codec = TactileACodec::new(DEFAULT_TACTILE_COLS, DEFAULT_TACTILE_ROWS);
|
||||||
|
let handler = TactileAHandler;
|
||||||
|
let poll_mode = PollMode::Enabled(Box::new(TactileAPollRequester::new(
|
||||||
|
Duration::from_millis(DEFAULT_TACTILE_POLL_INTERVAL_MS),
|
||||||
|
DEFAULT_TACTILE_COLS,
|
||||||
|
DEFAULT_TACTILE_ROWS,
|
||||||
|
Duration::from_millis(DEFAULT_TACTILE_REPLY_TIMEOUT_MS),
|
||||||
|
)));
|
||||||
|
|
||||||
|
if let Err(error) = serial::run_serial_with_poll(
|
||||||
|
task_app.clone(),
|
||||||
|
port,
|
||||||
|
codec,
|
||||||
|
handler,
|
||||||
|
session_started_at,
|
||||||
|
task_record.clone(),
|
||||||
|
task_cancel,
|
||||||
|
poll_mode,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
{
|
||||||
|
eprintln!("serial task exited with error: {error}");
|
||||||
|
}
|
||||||
|
|
||||||
|
let manager = task_app.state::<SerialConnectionState>();
|
||||||
|
if let Ok(mut last_record) = manager.last_record.lock() {
|
||||||
|
*last_record = Some(task_record);
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut session = match manager.session.lock() {
|
||||||
|
Ok(session) => session,
|
||||||
|
Err(_) => return,
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
let should_clear = session
|
||||||
|
.as_ref()
|
||||||
|
.map(|current| current.port.as_str() == task_port_name.as_str())
|
||||||
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
if should_clear {
|
||||||
|
session.take();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let mut session = state.session.lock().map_err(|_| SerialError::StateError)?;
|
||||||
|
if session.is_some() {
|
||||||
|
cancel.cancel();
|
||||||
|
task.abort();
|
||||||
|
return Err(SerialError::AlreadyConnected);
|
||||||
|
}
|
||||||
|
|
||||||
|
*session = Some(SerialSession {
|
||||||
|
port: device_name.clone(),
|
||||||
|
cancel,
|
||||||
|
task,
|
||||||
|
current_record,
|
||||||
|
});
|
||||||
|
|
||||||
|
Ok(SerialConnectResponse {
|
||||||
|
port: device_name,
|
||||||
|
connected: true,
|
||||||
|
message: "connected".to_string(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn serial_export_csv(
|
pub fn serial_export_csv(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
state: State<'_, SerialConnectionState>,
|
state: State<'_, SerialConnectionState>,
|
||||||
) -> Result<SerialExportResponse, SerialError> {
|
) -> Result<SerialExportResponse, SerialError> {
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
let mut output_dir = match app.path().desktop_dir() {
|
let mut output_dir = match app.path().desktop_dir() {
|
||||||
Ok(path) => path,
|
Ok(path) => path,
|
||||||
Err(_) => std::env::current_dir().map_err(|_| SerialError::ExportError)?,
|
Err(_) => std::env::current_dir().map_err(|_| SerialError::ExportError)?,
|
||||||
};
|
};
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
let mut output_dir = match app.path().download_dir() {
|
||||||
|
Ok(path) => path,
|
||||||
|
Err(_) => app.path().document_dir()
|
||||||
|
.or_else(|_| app.path().home_dir())
|
||||||
|
.or_else(|_| std::env::current_dir())
|
||||||
|
.map_err(|_| SerialError::ExportError)?,
|
||||||
|
};
|
||||||
|
|
||||||
let timestamp = SystemTime::now()
|
let timestamp = SystemTime::now()
|
||||||
.duration_since(UNIX_EPOCH)
|
.duration_since(UNIX_EPOCH)
|
||||||
|
|||||||
@@ -9,13 +9,23 @@ fn main_window(app: &AppHandle) -> Result<WebviewWindow, String> {
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn win_minimize(app: AppHandle) -> Result<(), String> {
|
pub fn win_minimize(app: AppHandle) -> Result<(), String> {
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
|
{
|
||||||
main_window(&app)?
|
main_window(&app)?
|
||||||
.minimize()
|
.minimize()
|
||||||
.map_err(|error| error.to_string())
|
.map_err(|error| error.to_string())
|
||||||
}
|
}
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
{
|
||||||
|
let _ = app;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn win_toggle_maximize(app: AppHandle) -> Result<(), String> {
|
pub fn win_toggle_maximize(app: AppHandle) -> Result<(), String> {
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
|
{
|
||||||
let window = main_window(&app)?;
|
let window = main_window(&app)?;
|
||||||
let is_maximized = window.is_maximized().map_err(|error| error.to_string())?;
|
let is_maximized = window.is_maximized().map_err(|error| error.to_string())?;
|
||||||
|
|
||||||
@@ -25,6 +35,12 @@ pub fn win_toggle_maximize(app: AppHandle) -> Result<(), String> {
|
|||||||
window.maximize().map_err(|error| error.to_string())
|
window.maximize().map_err(|error| error.to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
{
|
||||||
|
let _ = app;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn win_close(
|
pub async fn win_close(
|
||||||
|
|||||||
@@ -10,6 +10,16 @@ use commands::serial::SerialConnectionState;
|
|||||||
#[cfg(feature = "devkit")]
|
#[cfg(feature = "devkit")]
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
|
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
fn usb_serial_plugin<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||||
|
tauri::plugin::Builder::new("usb-serial")
|
||||||
|
.setup(|_app, api| {
|
||||||
|
api.register_android_plugin("com.lenn.tauri_serial", "UsbSerialPlugin")?;
|
||||||
|
Ok(())
|
||||||
|
})
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "devkit")]
|
#[cfg(feature = "devkit")]
|
||||||
fn start_server_exe(exe_path: &std::path::Path) {
|
fn start_server_exe(exe_path: &std::path::Path) {
|
||||||
let mut command = std::process::Command::new(exe_path);
|
let mut command = std::process::Command::new(exe_path);
|
||||||
@@ -66,6 +76,9 @@ pub fn run() {
|
|||||||
.manage(SerialConnectionState::default())
|
.manage(SerialConnectionState::default())
|
||||||
.plugin(tauri_plugin_opener::init());
|
.plugin(tauri_plugin_opener::init());
|
||||||
|
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
let builder = builder.plugin(usb_serial_plugin());
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
let builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
|
let builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
|
||||||
|
|
||||||
@@ -135,7 +148,7 @@ pub fn run() {
|
|||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
|
|
||||||
#[cfg(feature = "devkit")]
|
#[cfg(all(feature = "devkit", not(target_os = "android")))]
|
||||||
let builder = builder.invoke_handler(tauri::generate_handler![
|
let builder = builder.invoke_handler(tauri::generate_handler![
|
||||||
commands::file_explorer::file_explorer_list,
|
commands::file_explorer::file_explorer_list,
|
||||||
commands::serial::serial_enum,
|
commands::serial::serial_enum,
|
||||||
@@ -157,7 +170,7 @@ pub fn run() {
|
|||||||
commands::devkit::devkit_process_export
|
commands::devkit::devkit_process_export
|
||||||
]);
|
]);
|
||||||
|
|
||||||
#[cfg(not(feature = "devkit"))]
|
#[cfg(all(not(feature = "devkit"), not(target_os = "android")))]
|
||||||
let builder = builder.invoke_handler(tauri::generate_handler![
|
let builder = builder.invoke_handler(tauri::generate_handler![
|
||||||
commands::file_explorer::file_explorer_list,
|
commands::file_explorer::file_explorer_list,
|
||||||
commands::serial::serial_enum,
|
commands::serial::serial_enum,
|
||||||
@@ -173,6 +186,44 @@ pub fn run() {
|
|||||||
commands::window::win_close
|
commands::window::win_close
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
#[cfg(all(feature = "devkit", target_os = "android"))]
|
||||||
|
let builder = builder.invoke_handler(tauri::generate_handler![
|
||||||
|
commands::file_explorer::file_explorer_list,
|
||||||
|
commands::serial::serial_enum,
|
||||||
|
commands::serial::serial_connect_fd,
|
||||||
|
commands::serial::serial_disconnect,
|
||||||
|
commands::serial::serial_export_csv,
|
||||||
|
commands::serial::serial_has_record_data,
|
||||||
|
commands::serial::serial_export_csv_to_path,
|
||||||
|
commands::serial::serial_import_csv,
|
||||||
|
commands::serial::serial_import_csv_from_path,
|
||||||
|
commands::window::win_minimize,
|
||||||
|
commands::window::win_toggle_maximize,
|
||||||
|
commands::window::win_close,
|
||||||
|
commands::devkit::devkit_status,
|
||||||
|
commands::devkit::devkit_start,
|
||||||
|
commands::devkit::devkit_stop,
|
||||||
|
commands::devkit::devkit_get_config,
|
||||||
|
commands::devkit::devkit_set_config,
|
||||||
|
commands::devkit::devkit_process_export
|
||||||
|
]);
|
||||||
|
|
||||||
|
#[cfg(all(not(feature = "devkit"), target_os = "android"))]
|
||||||
|
let builder = builder.invoke_handler(tauri::generate_handler![
|
||||||
|
commands::file_explorer::file_explorer_list,
|
||||||
|
commands::serial::serial_enum,
|
||||||
|
commands::serial::serial_connect_fd,
|
||||||
|
commands::serial::serial_disconnect,
|
||||||
|
commands::serial::serial_export_csv,
|
||||||
|
commands::serial::serial_has_record_data,
|
||||||
|
commands::serial::serial_export_csv_to_path,
|
||||||
|
commands::serial::serial_import_csv,
|
||||||
|
commands::serial::serial_import_csv_from_path,
|
||||||
|
commands::window::win_minimize,
|
||||||
|
commands::window::win_toggle_maximize,
|
||||||
|
commands::window::win_close
|
||||||
|
]);
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
|
|||||||
@@ -1,397 +0,0 @@
|
|||||||
//! 7×12 柔性压力点阵力估计 - Rust 实现
|
|
||||||
//!
|
|
||||||
//! 与 Python `basin_feature_extractor.py` 完全对齐。
|
|
||||||
//! 内嵌 `model_params.json`,对每帧 7×12 传感器数据提取 68 维特征并用
|
|
||||||
//! StandardScaler + Ridge 回归估计法向力 Fz。
|
|
||||||
|
|
||||||
use serde::Deserialize;
|
|
||||||
|
|
||||||
// ───────────────── 常量 ─────────────────
|
|
||||||
|
|
||||||
const ROWS: usize = 7;
|
|
||||||
const COLS: usize = 12;
|
|
||||||
const ROI_RADIUS: usize = 2;
|
|
||||||
const ROI_SIZE: usize = 2 * ROI_RADIUS + 1; // 5
|
|
||||||
const N_FEATURES: usize = 68; // 25 + 25 + 18
|
|
||||||
|
|
||||||
// ───────────────── 模型参数 JSON(编译时嵌入)─────────────────
|
|
||||||
|
|
||||||
const MODEL_PARAMS_JSON: &str = include_str!("../../resources/model_params.json");
|
|
||||||
|
|
||||||
// ───────────────── 模型参数反序列化 ─────────────────
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
|
||||||
struct ModelParams {
|
|
||||||
scaler_mean: Vec<f64>,
|
|
||||||
scaler_scale: Vec<f64>,
|
|
||||||
ridge_coef: Vec<f64>,
|
|
||||||
ridge_intercept: f64,
|
|
||||||
n_features: usize,
|
|
||||||
noise_threshold: f64,
|
|
||||||
contact_threshold: f64,
|
|
||||||
ema_alpha: f64,
|
|
||||||
}
|
|
||||||
|
|
||||||
// ───────────────── 估算器 ─────────────────
|
|
||||||
|
|
||||||
pub struct BasinForceEstimator {
|
|
||||||
// 模型参数
|
|
||||||
scaler_mean: [f64; N_FEATURES],
|
|
||||||
scaler_scale: [f64; N_FEATURES],
|
|
||||||
ridge_coef: [f64; N_FEATURES],
|
|
||||||
ridge_intercept: f64,
|
|
||||||
// 超参数
|
|
||||||
noise_threshold: f64,
|
|
||||||
contact_threshold: f64,
|
|
||||||
ema_alpha: f64,
|
|
||||||
// 时序状态(需要可变)
|
|
||||||
prev_roi_sum: f64,
|
|
||||||
ema_sum: f64,
|
|
||||||
first_frame: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl BasinForceEstimator {
|
|
||||||
/// 使用编译时内嵌的 model_params.json 创建估算器
|
|
||||||
pub fn new() -> Self {
|
|
||||||
Self::from_json_str(MODEL_PARAMS_JSON)
|
|
||||||
.expect("内嵌 model_params.json 加载失败")
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn from_json_str(json: &str) -> Result<Self, Box<dyn std::error::Error>> {
|
|
||||||
let p: ModelParams = serde_json::from_str(json)?;
|
|
||||||
if p.n_features != N_FEATURES {
|
|
||||||
return Err(format!(
|
|
||||||
"模型特征维度不匹配: 期望 {}, 实际 {}",
|
|
||||||
N_FEATURES, p.n_features
|
|
||||||
)
|
|
||||||
.into());
|
|
||||||
}
|
|
||||||
let mut scaler_mean = [0.0; N_FEATURES];
|
|
||||||
let mut scaler_scale = [0.0; N_FEATURES];
|
|
||||||
let mut ridge_coef = [0.0; N_FEATURES];
|
|
||||||
scaler_mean.copy_from_slice(&p.scaler_mean);
|
|
||||||
scaler_scale.copy_from_slice(&p.scaler_scale);
|
|
||||||
ridge_coef.copy_from_slice(&p.ridge_coef);
|
|
||||||
|
|
||||||
Ok(Self {
|
|
||||||
scaler_mean,
|
|
||||||
scaler_scale,
|
|
||||||
ridge_coef,
|
|
||||||
ridge_intercept: p.ridge_intercept,
|
|
||||||
noise_threshold: p.noise_threshold,
|
|
||||||
contact_threshold: p.contact_threshold,
|
|
||||||
ema_alpha: p.ema_alpha,
|
|
||||||
prev_roi_sum: 0.0,
|
|
||||||
ema_sum: 0.0,
|
|
||||||
first_frame: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn reset(&mut self) {
|
|
||||||
self.prev_roi_sum = 0.0;
|
|
||||||
self.ema_sum = 0.0;
|
|
||||||
self.first_frame = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn predict_frame(&mut self, frame: &[f64; 84]) -> f64 {
|
|
||||||
let features = self.extract_features(frame);
|
|
||||||
self.ridge_predict(&features)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ───────────── 特征提取 ─────────────
|
|
||||||
|
|
||||||
fn extract_features(&mut self, raw: &[f64; 84]) -> [f64; N_FEATURES] {
|
|
||||||
let mut x = [[0.0f64; COLS]; ROWS];
|
|
||||||
let mut max_value = 0.0f64;
|
|
||||||
for r in 0..ROWS {
|
|
||||||
for c in 0..COLS {
|
|
||||||
let v = raw[r * COLS + c].max(0.0);
|
|
||||||
x[r][c] = v;
|
|
||||||
if v > max_value {
|
|
||||||
max_value = v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if max_value < self.contact_threshold {
|
|
||||||
self.update_temporal(0.0);
|
|
||||||
return [0.0; N_FEATURES];
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut peak_row = 0usize;
|
|
||||||
let mut peak_col = 0usize;
|
|
||||||
for r in 0..ROWS {
|
|
||||||
for c in 0..COLS {
|
|
||||||
if x[r][c] >= x[peak_row][peak_col] {
|
|
||||||
peak_row = r;
|
|
||||||
peak_col = c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let roi = self.extract_roi(&x, peak_row, peak_col);
|
|
||||||
self.compute_features(&x, &roi, max_value, peak_row, peak_col)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn extract_roi(
|
|
||||||
&self,
|
|
||||||
x: &[[f64; COLS]; ROWS],
|
|
||||||
pr: usize,
|
|
||||||
pc: usize,
|
|
||||||
) -> [[f64; ROI_SIZE]; ROI_SIZE] {
|
|
||||||
let r = ROI_RADIUS as isize;
|
|
||||||
let mut roi = [[0.0f64; ROI_SIZE]; ROI_SIZE];
|
|
||||||
|
|
||||||
let r_start = (pr as isize - r).max(0) as usize;
|
|
||||||
let r_end = (pr + ROI_RADIUS + 1).min(ROWS);
|
|
||||||
let c_start = (pc as isize - r).max(0) as usize;
|
|
||||||
let c_end = (pc + ROI_RADIUS + 1).min(COLS);
|
|
||||||
|
|
||||||
let roi_r_start = (r_start as isize - (pr as isize - r)).max(0) as usize;
|
|
||||||
let roi_c_start = (c_start as isize - (pc as isize - r)).max(0) as usize;
|
|
||||||
|
|
||||||
for (i, ri) in (r_start..r_end).enumerate() {
|
|
||||||
for (j, ci) in (c_start..c_end).enumerate() {
|
|
||||||
roi[roi_r_start + i][roi_c_start + j] = x[ri][ci];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
roi
|
|
||||||
}
|
|
||||||
|
|
||||||
fn compute_features(
|
|
||||||
&mut self,
|
|
||||||
x: &[[f64; COLS]; ROWS],
|
|
||||||
roi: &[[f64; ROI_SIZE]; ROI_SIZE],
|
|
||||||
max_value: f64,
|
|
||||||
peak_row: usize,
|
|
||||||
peak_col: usize,
|
|
||||||
) -> [f64; N_FEATURES] {
|
|
||||||
let center = ROI_RADIUS;
|
|
||||||
let mut feat = [0.0f64; N_FEATURES];
|
|
||||||
let mut idx = 0;
|
|
||||||
|
|
||||||
// ROI 原始值 (25维)
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
feat[idx] = roi[r][c];
|
|
||||||
idx += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ROI 归一化形状 (25维)
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
feat[idx] = if max_value > 0.0 {
|
|
||||||
roi[r][c] / max_value
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
idx += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// roi_sum, global_sum
|
|
||||||
let mut roi_sum = 0.0f64;
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
roi_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let mut global_sum = 0.0f64;
|
|
||||||
for r in 0..ROWS {
|
|
||||||
for c in 0..COLS {
|
|
||||||
global_sum += x[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// active_area
|
|
||||||
let thr = self.noise_threshold.max(0.05 * max_value);
|
|
||||||
let mut active_area = 0.0f64;
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
if roi[r][c] > thr {
|
|
||||||
active_area += 1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let participation = if max_value > 0.0 {
|
|
||||||
roi_sum / max_value
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
let concentration = if roi_sum > 0.0 {
|
|
||||||
max_value / roi_sum
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// ring1_sum (上下左右4点)
|
|
||||||
let ring1_positions = [
|
|
||||||
(center - 1, center),
|
|
||||||
(center + 1, center),
|
|
||||||
(center, center - 1),
|
|
||||||
(center, center + 1),
|
|
||||||
];
|
|
||||||
let ring1_sum: f64 = ring1_positions.iter().map(|&(r, c)| roi[r][c]).sum();
|
|
||||||
|
|
||||||
// ring2_sum (除中心和ring1外)
|
|
||||||
let mut ring2_sum = 0.0f64;
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
if (r, c) == (center, center) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ring1_positions.contains(&(r, c)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ring2_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let ring1_ratio = if max_value > 0.0 {
|
|
||||||
ring1_sum / max_value
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
let ring2_ratio = if max_value > 0.0 {
|
|
||||||
ring2_sum / max_value
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// spread
|
|
||||||
let spread = if roi_sum > 0.0 {
|
|
||||||
let mut s = 0.0f64;
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
let dr = r as f64 - center as f64;
|
|
||||||
let dc = c as f64 - center as f64;
|
|
||||||
s += (dr * dr + dc * dc) * roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
s / roi_sum
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// asym_x
|
|
||||||
let mut left_sum = 0.0f64;
|
|
||||||
let mut right_sum = 0.0f64;
|
|
||||||
for r in 0..ROI_SIZE {
|
|
||||||
for c in 0..center {
|
|
||||||
left_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
for c in (center + 1)..ROI_SIZE {
|
|
||||||
right_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let asym_x = if roi_sum > 0.0 {
|
|
||||||
(right_sum - left_sum) / roi_sum
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// asym_y
|
|
||||||
let mut up_sum = 0.0f64;
|
|
||||||
let mut down_sum = 0.0f64;
|
|
||||||
for r in 0..center {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
up_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for r in (center + 1)..ROI_SIZE {
|
|
||||||
for c in 0..ROI_SIZE {
|
|
||||||
down_sum += roi[r][c];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let asym_y = if roi_sum > 0.0 {
|
|
||||||
(down_sum - up_sum) / roi_sum
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// 位置
|
|
||||||
let peak_row_norm = peak_row as f64 / (ROWS - 1) as f64;
|
|
||||||
let peak_col_norm = peak_col as f64 / (COLS - 1) as f64;
|
|
||||||
|
|
||||||
// near_edge
|
|
||||||
let r = ROI_RADIUS as isize;
|
|
||||||
let near_edge = if (peak_row as isize) < r
|
|
||||||
|| peak_row >= ROWS - ROI_RADIUS
|
|
||||||
|| (peak_col as isize) < r
|
|
||||||
|| peak_col >= COLS - ROI_RADIUS
|
|
||||||
{
|
|
||||||
1.0
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
|
|
||||||
// 时序特征
|
|
||||||
let delta_sum = roi_sum - self.prev_roi_sum;
|
|
||||||
if self.first_frame {
|
|
||||||
self.ema_sum = roi_sum;
|
|
||||||
self.first_frame = false;
|
|
||||||
} else {
|
|
||||||
self.ema_sum = self.ema_alpha * self.ema_sum + (1.0 - self.ema_alpha) * roi_sum;
|
|
||||||
}
|
|
||||||
self.prev_roi_sum = roi_sum;
|
|
||||||
|
|
||||||
let scalars = [
|
|
||||||
max_value,
|
|
||||||
roi_sum,
|
|
||||||
global_sum,
|
|
||||||
active_area,
|
|
||||||
participation,
|
|
||||||
concentration,
|
|
||||||
ring1_sum,
|
|
||||||
ring2_sum,
|
|
||||||
ring1_ratio,
|
|
||||||
ring2_ratio,
|
|
||||||
spread,
|
|
||||||
asym_x,
|
|
||||||
asym_y,
|
|
||||||
peak_row_norm,
|
|
||||||
peak_col_norm,
|
|
||||||
near_edge,
|
|
||||||
delta_sum,
|
|
||||||
self.ema_sum,
|
|
||||||
];
|
|
||||||
for &v in &scalars {
|
|
||||||
feat[idx] = v;
|
|
||||||
idx += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_assert_eq!(idx, N_FEATURES);
|
|
||||||
feat
|
|
||||||
}
|
|
||||||
|
|
||||||
fn update_temporal(&mut self, roi_sum: f64) {
|
|
||||||
self.prev_roi_sum = roi_sum;
|
|
||||||
if self.first_frame {
|
|
||||||
self.ema_sum = roi_sum;
|
|
||||||
self.first_frame = false;
|
|
||||||
} else {
|
|
||||||
self.ema_sum = self.ema_alpha * self.ema_sum + (1.0 - self.ema_alpha) * roi_sum;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ───────────── 推理 ─────────────
|
|
||||||
|
|
||||||
fn ridge_predict(&self, features: &[f64; N_FEATURES]) -> f64 {
|
|
||||||
let mut scaled = [0.0f64; N_FEATURES];
|
|
||||||
for i in 0..N_FEATURES {
|
|
||||||
let s = self.scaler_scale[i];
|
|
||||||
scaled[i] = if s.abs() > 1e-12 {
|
|
||||||
(features[i] - self.scaler_mean[i]) / s
|
|
||||||
} else {
|
|
||||||
0.0
|
|
||||||
};
|
|
||||||
}
|
|
||||||
let mut y = self.ridge_intercept;
|
|
||||||
for i in 0..N_FEATURES {
|
|
||||||
y += self.ridge_coef[i] * scaled[i];
|
|
||||||
}
|
|
||||||
y
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,7 +12,7 @@ use async_trait::async_trait;
|
|||||||
use csv::StringRecord;
|
use csv::StringRecord;
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use log::{debug, info};
|
use log::debug;
|
||||||
|
|
||||||
const FRAME_BUFFER_MIN_LENGTH: usize = 15;
|
const FRAME_BUFFER_MIN_LENGTH: usize = 15;
|
||||||
|
|
||||||
@@ -226,7 +226,6 @@ impl Codec<TactileAFrame> for TactileACodec {
|
|||||||
req_bytes.extend_from_slice((f.meta.except_data_len as u16).to_le_bytes().as_slice());
|
req_bytes.extend_from_slice((f.meta.except_data_len as u16).to_le_bytes().as_slice());
|
||||||
let checksum = calc_crc8_itu(req_bytes.as_slice());
|
let checksum = calc_crc8_itu(req_bytes.as_slice());
|
||||||
req_bytes.push(checksum);
|
req_bytes.push(checksum);
|
||||||
info!("send: {:02X?}", req_bytes);
|
|
||||||
Ok(req_bytes)
|
Ok(req_bytes)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ pub mod model;
|
|||||||
pub mod serial;
|
pub mod serial;
|
||||||
pub mod record;
|
pub mod record;
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
pub mod raw_fd_stream;
|
||||||
#[cfg(feature = "multi-dim")]
|
#[cfg(feature = "multi-dim")]
|
||||||
pub mod multi_dim_force;
|
pub mod multi_dim_force;
|
||||||
pub mod basin_force_estimator;
|
|
||||||
|
|
||||||
pub type TestRecording = Recording<TestFrame>;
|
pub type TestRecording = Recording<TestFrame>;
|
||||||
pub type TactileARecording = Recording<TactileAFrame>;
|
pub type TactileARecording = Recording<TactileAFrame>;
|
||||||
|
|||||||
127
src-tauri/src/serial_core/raw_fd_stream.rs
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
use std::io;
|
||||||
|
use std::os::unix::io::RawFd;
|
||||||
|
use tokio::io::unix::AsyncFd;
|
||||||
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
|
|
||||||
|
/// A wrapper around a raw file descriptor that implements AsyncRead + AsyncWrite.
|
||||||
|
/// Uses tokio's AsyncFd to properly integrate with the async reactor.
|
||||||
|
/// Used on Android to wrap USB device file descriptors obtained from the USB Host API.
|
||||||
|
pub struct RawFdStream {
|
||||||
|
inner: AsyncFd<RawFd>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RawFdStream {
|
||||||
|
pub fn new(fd: RawFd) -> io::Result<Self> {
|
||||||
|
if fd < 0 {
|
||||||
|
return Err(io::Error::new(io::ErrorKind::InvalidInput, "invalid fd"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set non-blocking
|
||||||
|
unsafe {
|
||||||
|
let flags = libc::fcntl(fd, libc::F_GETFL);
|
||||||
|
if flags < 0 {
|
||||||
|
return Err(io::Error::last_os_error());
|
||||||
|
}
|
||||||
|
if libc::fcntl(fd, libc::F_SETFL, flags | libc::O_NONBLOCK) < 0 {
|
||||||
|
return Err(io::Error::last_os_error());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let inner = AsyncFd::new(fd)?;
|
||||||
|
Ok(Self { inner })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Drop for RawFdStream {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
unsafe {
|
||||||
|
libc::close(*self.inner.get_ref());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AsyncRead for RawFdStream {
|
||||||
|
fn poll_read(
|
||||||
|
self: std::pin::Pin<&mut Self>,
|
||||||
|
cx: &mut std::task::Context<'_>,
|
||||||
|
buf: &mut ReadBuf<'_>,
|
||||||
|
) -> std::task::Poll<io::Result<()>> {
|
||||||
|
loop {
|
||||||
|
let mut guard = match self.inner.poll_read_ready(cx) {
|
||||||
|
std::task::Poll::Ready(Ok(guard)) => guard,
|
||||||
|
std::task::Poll::Ready(Err(e)) => return std::task::Poll::Ready(Err(e)),
|
||||||
|
std::task::Poll::Pending => return std::task::Poll::Pending,
|
||||||
|
};
|
||||||
|
|
||||||
|
let unfilled = buf.initialize_unfilled();
|
||||||
|
let result = unsafe {
|
||||||
|
libc::read(
|
||||||
|
*self.inner.get_ref(),
|
||||||
|
unfilled.as_mut_ptr() as *mut libc::c_void,
|
||||||
|
unfilled.len(),
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
if result < 0 {
|
||||||
|
let err = io::Error::last_os_error();
|
||||||
|
if err.kind() == io::ErrorKind::WouldBlock {
|
||||||
|
guard.clear_ready();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return std::task::Poll::Ready(Err(err));
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.advance(result as usize);
|
||||||
|
return std::task::Poll::Ready(Ok(()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AsyncWrite for RawFdStream {
|
||||||
|
fn poll_write(
|
||||||
|
self: std::pin::Pin<&mut Self>,
|
||||||
|
cx: &mut std::task::Context<'_>,
|
||||||
|
buf: &[u8],
|
||||||
|
) -> std::task::Poll<io::Result<usize>> {
|
||||||
|
loop {
|
||||||
|
let mut guard = match self.inner.poll_write_ready(cx) {
|
||||||
|
std::task::Poll::Ready(Ok(guard)) => guard,
|
||||||
|
std::task::Poll::Ready(Err(e)) => return std::task::Poll::Ready(Err(e)),
|
||||||
|
std::task::Poll::Pending => return std::task::Poll::Pending,
|
||||||
|
};
|
||||||
|
|
||||||
|
let result = unsafe {
|
||||||
|
libc::write(
|
||||||
|
*self.inner.get_ref(),
|
||||||
|
buf.as_ptr() as *const libc::c_void,
|
||||||
|
buf.len(),
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
if result < 0 {
|
||||||
|
let err = io::Error::last_os_error();
|
||||||
|
if err.kind() == io::ErrorKind::WouldBlock {
|
||||||
|
guard.clear_ready();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return std::task::Poll::Ready(Err(err));
|
||||||
|
}
|
||||||
|
|
||||||
|
return std::task::Poll::Ready(Ok(result as usize));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn poll_flush(
|
||||||
|
self: std::pin::Pin<&mut Self>,
|
||||||
|
_cx: &mut std::task::Context<'_>,
|
||||||
|
) -> std::task::Poll<io::Result<()>> {
|
||||||
|
std::task::Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn poll_shutdown(
|
||||||
|
self: std::pin::Pin<&mut Self>,
|
||||||
|
_cx: &mut std::task::Context<'_>,
|
||||||
|
) -> std::task::Poll<io::Result<()>> {
|
||||||
|
std::task::Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
use crate::serial_core::basin_force_estimator::BasinForceEstimator;
|
|
||||||
use crate::serial_core::codec::Codec;
|
use crate::serial_core::codec::Codec;
|
||||||
use crate::serial_core::codecs::tactile_a::TactileACodec;
|
use crate::serial_core::codecs::tactile_a::TactileACodec;
|
||||||
use crate::serial_core::frame::{FrameHandler, TactileAFrame, TestFrame};
|
use crate::serial_core::frame::{FrameHandler, TactileAFrame, TestFrame};
|
||||||
@@ -19,8 +18,9 @@ use std::time::Instant;
|
|||||||
use tauri::{AppHandle, Emitter};
|
use tauri::{AppHandle, Emitter};
|
||||||
#[cfg(feature = "devkit")]
|
#[cfg(feature = "devkit")]
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
|
||||||
use tokio::time::{self, Duration, MissedTickBehavior};
|
use tokio::time::{self, Duration, MissedTickBehavior};
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
use tokio_serial::SerialStream;
|
use tokio_serial::SerialStream;
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
|
|
||||||
@@ -172,6 +172,7 @@ impl PollRequester<TactileAFrame> for TactileAPollRequester {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
pub async fn run_serial<C, H, T, F>(
|
pub async fn run_serial<C, H, T, F>(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
port: SerialStream,
|
port: SerialStream,
|
||||||
@@ -202,7 +203,7 @@ where
|
|||||||
|
|
||||||
pub async fn run_serial_with_poll<C, H, T, F>(
|
pub async fn run_serial_with_poll<C, H, T, F>(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
mut port: SerialStream,
|
mut port: impl AsyncRead + AsyncWrite + Unpin,
|
||||||
mut codec: C,
|
mut codec: C,
|
||||||
mut handler: H,
|
mut handler: H,
|
||||||
session_started_at: Instant,
|
session_started_at: Instant,
|
||||||
@@ -234,7 +235,6 @@ where
|
|||||||
let mut prune_interval = time::interval(Duration::from_millis(450));
|
let mut prune_interval = time::interval(Duration::from_millis(450));
|
||||||
#[cfg(feature = "multi-dim")]
|
#[cfg(feature = "multi-dim")]
|
||||||
let mut pzt_processor = PztProcessor::new();
|
let mut pzt_processor = PztProcessor::new();
|
||||||
let mut force_estimator = BasinForceEstimator::new();
|
|
||||||
let mut pending_sub_frame: Option<PendingSubFrame<F>> = None;
|
let mut pending_sub_frame: Option<PendingSubFrame<F>> = None;
|
||||||
prune_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
|
prune_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
|
||||||
|
|
||||||
@@ -311,16 +311,6 @@ where
|
|||||||
drop(record);
|
drop(record);
|
||||||
|
|
||||||
if let Some(vals) = decode_res {
|
if let Some(vals) = decode_res {
|
||||||
// Basin force estimation (pre-force)
|
|
||||||
if vals.len() == 84 {
|
|
||||||
let mut frame_f64 = [0.0f64; 84];
|
|
||||||
for (i, v) in vals.iter().enumerate() {
|
|
||||||
frame_f64[i] = *v as f64;
|
|
||||||
}
|
|
||||||
let pre_force = force_estimator.predict_frame(&frame_f64);
|
|
||||||
debug!("pre-force: {:.2}", pre_force);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "multi-dim")]
|
#[cfg(feature = "multi-dim")]
|
||||||
{
|
{
|
||||||
let pzt_values = vals.iter().map(|value| *value as f32).collect::<Vec<f32>>();
|
let pzt_values = vals.iter().map(|value| *value as f32).collect::<Vec<f32>>();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"createUpdaterArtifacts": false,
|
"createUpdaterArtifacts": true,
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"icon": [
|
"icon": [
|
||||||
@@ -45,15 +45,5 @@
|
|||||||
"resources/je-skin-devkit-server.exe"
|
"resources/je-skin-devkit-server.exe"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {}
|
||||||
"updater": {
|
|
||||||
"windows": {
|
|
||||||
"installMode": "passive"
|
|
||||||
},
|
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDkwODM1QkFEODI2NkZENgpSV1RXYnliWXVqVUlDUVRxbjlseDNDNjhQTGpDYis4TEZMeUk2WVhiMEhTRWJhN3hGRnQ3TTJtcwo=",
|
|
||||||
"endpoints": [
|
|
||||||
"https://je-skin.cn-nb1.rains3.com/latest.json"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,747 +0,0 @@
|
|||||||
from typing import Dict, List, Tuple
|
|
||||||
import numpy as np
|
|
||||||
from indicator.base import Indicator
|
|
||||||
import math
|
|
||||||
|
|
||||||
|
|
||||||
class EMA:
|
|
||||||
"""指数移动平均"""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def calc(data: np.ndarray, period: int) -> np.ndarray:
|
|
||||||
alpha = 2.0 / (period + 1)
|
|
||||||
out = np.empty_like(data)
|
|
||||||
out[0] = data[0]
|
|
||||||
for i in range(1, len(data)):
|
|
||||||
out[i] = alpha * data[i] + (1 - alpha) * out[i - 1]
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
class SMA:
|
|
||||||
"""简单移动平均"""
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def calc(data: np.ndarray, period: int) -> np.ndarray:
|
|
||||||
out = np.full_like(data, np.nan)
|
|
||||||
if len(data) < period:
|
|
||||||
return out
|
|
||||||
cumsum = np.cumsum(data)
|
|
||||||
out[period - 1:] = (cumsum[period - 1:] - np.concatenate([[0], cumsum[:-period]])) / period
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
def true_range(high: np.ndarray, low: np.ndarray, close: np.ndarray) -> np.ndarray:
|
|
||||||
"""True Range"""
|
|
||||||
tr = np.empty(len(high))
|
|
||||||
tr[0] = high[0] - low[0]
|
|
||||||
for i in range(1, len(high)):
|
|
||||||
tr[i] = max(high[i] - low[i], abs(high[i] - close[i - 1]), abs(low[i] - close[i - 1]))
|
|
||||||
return tr
|
|
||||||
|
|
||||||
|
|
||||||
class SignalTracker:
|
|
||||||
"""逐帧更新的信号追踪器(无回看依赖,纯实时)"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
ob_threshold: float = 80,
|
|
||||||
os_threshold: float = 20,
|
|
||||||
dist_extreme: float = 5,
|
|
||||||
dist_far: float = 15,
|
|
||||||
dist_mid: float = 30,
|
|
||||||
macd_th: float = 0.3,
|
|
||||||
rsi_ob: float = 70,
|
|
||||||
rsi_os: float = 30,
|
|
||||||
di_gap_bull: float = 15,
|
|
||||||
di_gap_bear: float = -15,
|
|
||||||
aroon_ob: float = 80,
|
|
||||||
aroon_os: float = 20,
|
|
||||||
williams_ob: float = -20,
|
|
||||||
williams_os: float = -80,
|
|
||||||
bias_ob: float = 5,
|
|
||||||
bias_os: float = -5,
|
|
||||||
):
|
|
||||||
self.ob_threshold = ob_threshold
|
|
||||||
self.os_threshold = os_threshold
|
|
||||||
self.dist_extreme = dist_extreme
|
|
||||||
self.dist_far = dist_far
|
|
||||||
self.dist_mid = dist_mid
|
|
||||||
self.macd_th = macd_th
|
|
||||||
self.rsi_ob = rsi_ob
|
|
||||||
self.rsi_os = rsi_os
|
|
||||||
self.di_gap_bull = di_gap_bull
|
|
||||||
self.di_gap_bear = di_gap_bear
|
|
||||||
self.aroon_ob = aroon_ob
|
|
||||||
self.aroon_os = aroon_os
|
|
||||||
self.williams_ob = williams_ob
|
|
||||||
self.williams_os = williams_os
|
|
||||||
self.bias_ob = bias_ob
|
|
||||||
self.bias_os = bias_os
|
|
||||||
|
|
||||||
# 状态缓存
|
|
||||||
self._intp_buy_sma: float = 0.0
|
|
||||||
self._intp_sell_sma: float = 0.0
|
|
||||||
self._intp_sma_count: int = 0
|
|
||||||
self._max_qtb_score: float = 0.0
|
|
||||||
self._bull_count: int = 0
|
|
||||||
self._bear_count: int = 0
|
|
||||||
self._last_bull_idx: int = -100
|
|
||||||
self._last_bear_idx: int = -100
|
|
||||||
self._frame_idx: int = 0
|
|
||||||
|
|
||||||
# 历史缓冲区(保留最近200帧用于EMA/SMA/DI计算)
|
|
||||||
self._buf_size: int = 200
|
|
||||||
self._bbi_buf: List[float] = []
|
|
||||||
self._amplitude_buf: List[float] = []
|
|
||||||
self._close_buf: List[float] = []
|
|
||||||
self._high_buf: List[float] = []
|
|
||||||
self._low_buf: List[float] = []
|
|
||||||
self._wr_buf: List[float] = []
|
|
||||||
|
|
||||||
def reset(self):
|
|
||||||
"""重置所有状态"""
|
|
||||||
self._intp_buy_sma = 0.0
|
|
||||||
self._intp_sell_sma = 0.0
|
|
||||||
self._intp_sma_count = 0
|
|
||||||
self._max_qtb_score = 0.0
|
|
||||||
self._bull_count = 0
|
|
||||||
self._bear_count = 0
|
|
||||||
self._last_bull_idx = -100
|
|
||||||
self._last_bear_idx = -100
|
|
||||||
self._frame_idx = 0
|
|
||||||
self._bbi_buf.clear()
|
|
||||||
self._amplitude_buf.clear()
|
|
||||||
self._close_buf.clear()
|
|
||||||
self._high_buf.clear()
|
|
||||||
self._low_buf.clear()
|
|
||||||
self._wr_buf.clear()
|
|
||||||
|
|
||||||
def _append_buf(self, buf: List[float], val: float):
|
|
||||||
buf.append(val)
|
|
||||||
if len(buf) > self._buf_size:
|
|
||||||
buf.pop(0)
|
|
||||||
|
|
||||||
def _ema_val(self, buf: List[float], period: int) -> float:
|
|
||||||
"""返回缓冲区中最后一个EMA值"""
|
|
||||||
if len(buf) < period:
|
|
||||||
return buf[-1] if buf else 0.0
|
|
||||||
arr = np.array(buf, dtype=float)
|
|
||||||
ema = EMA.calc(arr, period)
|
|
||||||
return float(ema[-1])
|
|
||||||
|
|
||||||
def _sma_val(self, buf: List[float], period: int) -> float:
|
|
||||||
if len(buf) < period:
|
|
||||||
return np.nan
|
|
||||||
arr = np.array(buf, dtype=float)
|
|
||||||
sma = SMA.calc(arr, period)
|
|
||||||
return float(sma[-1])
|
|
||||||
|
|
||||||
def get_signals(
|
|
||||||
self,
|
|
||||||
amplitude: float,
|
|
||||||
bbi: float,
|
|
||||||
cci: float,
|
|
||||||
close: float,
|
|
||||||
dmk: float,
|
|
||||||
high: float,
|
|
||||||
k: float,
|
|
||||||
low: float,
|
|
||||||
qtb_score: float,
|
|
||||||
result: float,
|
|
||||||
wr: float,
|
|
||||||
percent: float,
|
|
||||||
v0: float,
|
|
||||||
boll_upper: float,
|
|
||||||
boll_lower: float,
|
|
||||||
macd_val: float,
|
|
||||||
pmacd: float,
|
|
||||||
bias: float,
|
|
||||||
) -> Tuple[str, str, str, str]:
|
|
||||||
"""
|
|
||||||
逐帧更新,返回 (market_status, signal_type, intensity, detail)
|
|
||||||
|
|
||||||
不依赖历史数组,所有指标值由外部实时计算后传入。
|
|
||||||
"""
|
|
||||||
|
|
||||||
# ─── 更新缓冲区 ───
|
|
||||||
self._append_buf(self._bbi_buf, bbi)
|
|
||||||
self._append_buf(self._amplitude_buf, amplitude)
|
|
||||||
self._append_buf(self._close_buf, close)
|
|
||||||
self._append_buf(self._high_buf, high)
|
|
||||||
self._append_buf(self._low_buf, low)
|
|
||||||
self._append_buf(self._wr_buf, wr)
|
|
||||||
|
|
||||||
# ─── 指标因子计算(使用传入值 + 缓冲区衍生值)───
|
|
||||||
k_macd = self._k_macd_factor(k, macd_val, pmacd)
|
|
||||||
k_di = self._k_di_factor(dmk, amplitude, close)
|
|
||||||
k_aroon = self._k_aroon_factor(high, low, close)
|
|
||||||
k_williams = self._k_williams_factor(wr)
|
|
||||||
k_result = self._k_result_factor(result)
|
|
||||||
k_bias = self._k_bias_factor(bias)
|
|
||||||
k_trix = self._k_trix_factor(close)
|
|
||||||
k_ema = self._k_ema_factor(close)
|
|
||||||
k_amplitude = self._k_amplitude_factor(amplitude)
|
|
||||||
|
|
||||||
# ─── 累计 ───
|
|
||||||
k_bull = k_macd + k_di + k_aroon + k_williams + k_result + k_bias + k_trix + k_ema + k_amplitude
|
|
||||||
k_bear = k_macd + k_di + k_aroon + k_williams + k_result + k_bias + k_trix + k_ema + k_amplitude
|
|
||||||
|
|
||||||
if result > self.ob_threshold and k_bull > 0 and result >= 90:
|
|
||||||
k_bull *= 1.5
|
|
||||||
|
|
||||||
# ─── 指数平滑 ───
|
|
||||||
if self._intp_sma_count == 0:
|
|
||||||
self._intp_buy_sma = k_bull
|
|
||||||
self._intp_sell_sma = k_bear
|
|
||||||
self._intp_sma_count = 1
|
|
||||||
else:
|
|
||||||
self._intp_sma_count += 1
|
|
||||||
period = max(3, min(5, self._intp_sma_count))
|
|
||||||
alpha = 2.0 / (period + 1)
|
|
||||||
self._intp_buy_sma = alpha * k_bull + (1 - alpha) * self._intp_buy_sma
|
|
||||||
self._intp_sell_sma = alpha * k_bear + (1 - alpha) * self._intp_sell_sma
|
|
||||||
|
|
||||||
# ─── 趋势确认与背离检测 ───
|
|
||||||
is_bull_div, is_bear_div = self._detect_divergence(close, result)
|
|
||||||
if is_bull_div:
|
|
||||||
self._intp_buy_sma *= 1.3
|
|
||||||
k_bull *= 1.3
|
|
||||||
if is_bear_div:
|
|
||||||
self._intp_sell_sma *= 1.3
|
|
||||||
k_bear *= 1.3
|
|
||||||
|
|
||||||
is_bull, is_bear = self._detect_trend(close)
|
|
||||||
if is_bull:
|
|
||||||
self._intp_buy_sma *= 1.15
|
|
||||||
k_bull *= 1.15
|
|
||||||
if is_bear:
|
|
||||||
self._intp_sell_sma *= 1.15
|
|
||||||
k_bear *= 1.15
|
|
||||||
|
|
||||||
wmacd = self._wmacd()
|
|
||||||
if wmacd > 0:
|
|
||||||
k_bull += wmacd * 0.5
|
|
||||||
elif wmacd < 0:
|
|
||||||
k_bear += abs(wmacd) * 0.5
|
|
||||||
|
|
||||||
if qtb_score > self._max_qtb_score * 0.7:
|
|
||||||
pass
|
|
||||||
elif qtb_score < 3 and qtb_score > 1:
|
|
||||||
k_bull *= 0.85
|
|
||||||
k_bear *= 0.85
|
|
||||||
|
|
||||||
# ─── 信号分类 ───
|
|
||||||
max_k = max(abs(k_bull), abs(k_bear))
|
|
||||||
if max_k > 0:
|
|
||||||
buy_score = ((k_bull + max_k) / (2 * max_k)) * 100
|
|
||||||
sell_score = ((k_bear + max_k) / (2 * max_k)) * 100
|
|
||||||
else:
|
|
||||||
buy_score = sell_score = 50
|
|
||||||
|
|
||||||
bull_t = buy_score > 70 and result < 90
|
|
||||||
bear_t = sell_score > 70 and result > 10
|
|
||||||
k_cci = cci / 300
|
|
||||||
boll_mid = self._boll_mid()
|
|
||||||
|
|
||||||
is_bull_t = (
|
|
||||||
bull_t
|
|
||||||
and k_bull > k_cci
|
|
||||||
and close < boll_mid
|
|
||||||
and (
|
|
||||||
(result > 65 and result < 85 and k_bull > 0 and k_bear > 0 and (k_bear - k_bull < 1.5 or result > 75))
|
|
||||||
or (result < 35 and result > 15 and k_bear > 0 and k_bull > 0 and (k_bull - k_bear < 1.5 or result < 25))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
is_bear_t = (
|
|
||||||
bear_t
|
|
||||||
and k_bear > k_cci
|
|
||||||
and close > boll_mid
|
|
||||||
and (
|
|
||||||
(result > 65 and result < 85 and k_bull > 0 and k_bear > 0 and (k_bear - k_bull < 1.5 or result > 75))
|
|
||||||
or (result < 35 and result > 15 and k_bear > 0 and k_bull > 0 and (k_bull - k_bear < 1.5 or result < 25))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if is_bull_t:
|
|
||||||
self._bull_count += 1
|
|
||||||
self._bear_count = 0
|
|
||||||
self._last_bull_idx = self._frame_idx
|
|
||||||
elif is_bear_t:
|
|
||||||
self._bear_count += 1
|
|
||||||
self._bull_count = 0
|
|
||||||
self._last_bear_idx = self._frame_idx
|
|
||||||
else:
|
|
||||||
self._bull_count = max(self._bull_count - 1, 0)
|
|
||||||
self._bear_count = max(self._bear_count - 1, 0)
|
|
||||||
|
|
||||||
# ─── 信号输出 ───
|
|
||||||
sig_strength = 1.0 + max(0, (self._bull_count - 3) * 0.1) + max(0, (self._bear_count - 3) * 0.1)
|
|
||||||
|
|
||||||
strength = (
|
|
||||||
"极强" if sig_strength >= 1.7
|
|
||||||
else "强" if sig_strength >= 1.4
|
|
||||||
else "中" if sig_strength >= 1.1
|
|
||||||
else "弱"
|
|
||||||
)
|
|
||||||
|
|
||||||
if buy_score >= sell_score:
|
|
||||||
signal = f"买{strength}"
|
|
||||||
else:
|
|
||||||
signal = f"卖{strength}"
|
|
||||||
|
|
||||||
# ─── 市场状态 ───
|
|
||||||
if abs(buy_score - sell_score) < 10:
|
|
||||||
status = "中性震荡"
|
|
||||||
elif buy_score > sell_score:
|
|
||||||
if self._bull_count >= 3:
|
|
||||||
status = "强势上涨"
|
|
||||||
elif result > self.ob_threshold:
|
|
||||||
status = "高位企稳"
|
|
||||||
else:
|
|
||||||
status = "温和上涨"
|
|
||||||
else:
|
|
||||||
if self._bear_count >= 3:
|
|
||||||
status = "强势下跌"
|
|
||||||
elif result < self.os_threshold:
|
|
||||||
status = "低位企稳"
|
|
||||||
else:
|
|
||||||
status = "温和下跌"
|
|
||||||
|
|
||||||
# ─── 距离 ───
|
|
||||||
boll_len = boll_upper - boll_lower
|
|
||||||
if boll_len > 0:
|
|
||||||
dist_ratio = (close - boll_lower) / boll_len * 100
|
|
||||||
else:
|
|
||||||
dist_ratio = 50
|
|
||||||
|
|
||||||
if dist_ratio < 50 - self.dist_extreme:
|
|
||||||
dist = "极端超卖"
|
|
||||||
elif dist_ratio < 50 - self.dist_far:
|
|
||||||
dist = "远离"
|
|
||||||
elif dist_ratio < 50 - self.dist_mid:
|
|
||||||
dist = "偏离"
|
|
||||||
elif dist_ratio < 50 + self.dist_mid:
|
|
||||||
dist = "接近"
|
|
||||||
elif dist_ratio < 50 + self.dist_far:
|
|
||||||
dist = "靠近"
|
|
||||||
elif dist_ratio < 50 + self.dist_extreme:
|
|
||||||
dist = "远超"
|
|
||||||
else:
|
|
||||||
dist = "极端超买"
|
|
||||||
|
|
||||||
# ─── 强度 ───
|
|
||||||
max_score = max(buy_score, sell_score)
|
|
||||||
intensity = (
|
|
||||||
"超强" if max_score >= 90
|
|
||||||
else "强" if max_score >= 80
|
|
||||||
else "中" if max_score >= 65
|
|
||||||
else "弱" if max_score >= 55
|
|
||||||
else "极弱"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ─── 详情 ───
|
|
||||||
bias_val = self._ema_bias()
|
|
||||||
bbp_val = self._boll_pct_b(close, boll_upper, boll_lower)
|
|
||||||
detail = (
|
|
||||||
f"前量:{percent:.1f} 数量:{int(amplitude):03d} 百分比:{bbp_val:.1f} "
|
|
||||||
f"正:{k_bull:.1f} 负:{k_bear:.1f} 连买:{self._bull_count} 连卖:{self._bear_count} "
|
|
||||||
f"误差:{bias_val:.1f}"
|
|
||||||
)
|
|
||||||
|
|
||||||
self._frame_idx += 1
|
|
||||||
return status, signal, intensity, detail
|
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════
|
|
||||||
# 指标因子(全部基于实时数据,无回看窗口)
|
|
||||||
# ═══════════════════════════════════════════════════
|
|
||||||
|
|
||||||
def _k_macd_factor(self, k: float, macd_val: float, pmacd: float) -> float:
|
|
||||||
is_ob = k > self.ob_threshold
|
|
||||||
is_os = k < self.os_threshold
|
|
||||||
k_macd = 0.0
|
|
||||||
if is_ob or is_os:
|
|
||||||
if macd_val < 0:
|
|
||||||
if is_os and k < 30 and pmacd > 0 and pmacd <= 10 and macd_val > 1.5:
|
|
||||||
k_macd = 3.5
|
|
||||||
elif is_ob and k > 80 and macd_val > 3 and abs(pmacd) < 5:
|
|
||||||
k_macd = -3.5
|
|
||||||
elif pmacd < 0 and macd_val < 0:
|
|
||||||
if abs(pmacd) > 15 and macd_val >= -0.5:
|
|
||||||
k_macd = 3.5
|
|
||||||
elif 5 < abs(pmacd) < 15 and macd_val > 0.7:
|
|
||||||
k_macd = 3.5
|
|
||||||
elif pmacd > 0 and macd_val > 0:
|
|
||||||
if pmacd >= 15 and macd_val < 0.5:
|
|
||||||
k_macd = -3.5
|
|
||||||
elif 5 < pmacd < 15 and macd_val < -0.7:
|
|
||||||
k_macd = -3.5
|
|
||||||
elif macd_val >= 3:
|
|
||||||
k_macd = macd_val * 1.5
|
|
||||||
elif macd_val <= -3:
|
|
||||||
k_macd = macd_val * 1.5
|
|
||||||
return k_macd
|
|
||||||
|
|
||||||
def _k_di_factor(self, dmk: float, amplitude: float, close: float) -> float:
|
|
||||||
if len(self._close_buf) < 20:
|
|
||||||
return 0.0
|
|
||||||
k_close = np.array(self._close_buf, dtype=float)
|
|
||||||
period = 14
|
|
||||||
if len(k_close) < period + 1:
|
|
||||||
return 0.0
|
|
||||||
dx_list = []
|
|
||||||
for i in range(1, min(period + 1, len(k_close))):
|
|
||||||
diff = k_close[-i] - k_close[-i - 1]
|
|
||||||
dx_list.append(diff)
|
|
||||||
if not dx_list:
|
|
||||||
return 0.0
|
|
||||||
last_diff = dx_list[0]
|
|
||||||
adx_val = abs(dmk) * 0.5
|
|
||||||
|
|
||||||
k_di = 0.0
|
|
||||||
if adx_val < 20:
|
|
||||||
return 0.0
|
|
||||||
if dmk > 0 and len(dx_list) > 5:
|
|
||||||
gains = [d for d in dx_list[:5] if d > 0]
|
|
||||||
if len(gains) >= 3 and last_diff > 0:
|
|
||||||
k_di = min(adx_val / 5, 6.0)
|
|
||||||
elif dmk < 0 and len(dx_list) > 5:
|
|
||||||
losses = [d for d in dx_list[:5] if d < 0]
|
|
||||||
if len(losses) >= 3 and last_diff < 0:
|
|
||||||
k_di = -min(adx_val / 5, 6.0)
|
|
||||||
return k_di
|
|
||||||
|
|
||||||
def _k_aroon_factor(self, high: float, low: float, close: float) -> float:
|
|
||||||
period = 14
|
|
||||||
if len(self._high_buf) < period:
|
|
||||||
return 0.0
|
|
||||||
highs = self._high_buf[-period:]
|
|
||||||
lows = self._low_buf[-period:]
|
|
||||||
highest = max(highs)
|
|
||||||
lowest = min(lows)
|
|
||||||
rng = highest - lowest
|
|
||||||
if rng == 0:
|
|
||||||
return 0.0
|
|
||||||
k_aroon = 0.0
|
|
||||||
pct = (close - lowest) / rng * 100
|
|
||||||
if pct >= self.aroon_ob:
|
|
||||||
if close >= highest * 0.995:
|
|
||||||
k_aroon = -2.0
|
|
||||||
else:
|
|
||||||
k_aroon = 2.0
|
|
||||||
elif pct <= self.aroon_os:
|
|
||||||
if close <= lowest * 1.005:
|
|
||||||
k_aroon = 2.0
|
|
||||||
else:
|
|
||||||
k_aroon = -2.0
|
|
||||||
else:
|
|
||||||
k_aroon = (pct - 50) / 50 * 1.2
|
|
||||||
return k_aroon
|
|
||||||
|
|
||||||
def _k_williams_factor(self, wr: float) -> float:
|
|
||||||
k_wr = 0.0
|
|
||||||
if wr > self.williams_ob:
|
|
||||||
if wr > -10:
|
|
||||||
k_wr = -1.2
|
|
||||||
else:
|
|
||||||
k_wr = -0.8
|
|
||||||
elif wr < self.williams_os:
|
|
||||||
if wr < -90:
|
|
||||||
k_wr = 1.2
|
|
||||||
else:
|
|
||||||
k_wr = 0.8
|
|
||||||
return k_wr
|
|
||||||
|
|
||||||
def _k_result_factor(self, result: float) -> float:
|
|
||||||
k_result = 0.0
|
|
||||||
is_ob = result > self.ob_threshold
|
|
||||||
is_os = result < self.os_threshold
|
|
||||||
if is_os and result < 10:
|
|
||||||
k_result = 1.5
|
|
||||||
elif is_ob and result > 90:
|
|
||||||
k_result = -1.5
|
|
||||||
return k_result
|
|
||||||
|
|
||||||
def _k_bias_factor(self, bias: float) -> float:
|
|
||||||
k_bias = 0.0
|
|
||||||
if bias < self.bias_os and bias < -3:
|
|
||||||
k_bias = min(abs(bias) / 5, 2.5)
|
|
||||||
elif bias > self.bias_ob and bias > 3:
|
|
||||||
k_bias = -min(abs(bias) / 5, 2.5)
|
|
||||||
return k_bias
|
|
||||||
|
|
||||||
def _k_trix_factor(self, close: float) -> float:
|
|
||||||
ema3 = self._ema_val(self._close_buf, 3)
|
|
||||||
ema9 = self._ema_val(self._close_buf, 9)
|
|
||||||
if ema9 == 0:
|
|
||||||
return 0.0
|
|
||||||
trix = (ema3 - ema9) / ema9 * 100
|
|
||||||
k_trix = 0.0
|
|
||||||
if trix > 0:
|
|
||||||
k_trix = min(trix / 2, 3.0)
|
|
||||||
elif trix < 0:
|
|
||||||
k_trix = max(trix / 2, -3.0)
|
|
||||||
return k_trix
|
|
||||||
|
|
||||||
def _k_ema_factor(self, close: float) -> float:
|
|
||||||
ema9 = self._ema_val(self._close_buf, 9)
|
|
||||||
if ema9 == 0:
|
|
||||||
return 0.0
|
|
||||||
bias = (close - ema9) / ema9 * 100
|
|
||||||
k_ema = 0.0
|
|
||||||
if bias < -2:
|
|
||||||
k_ema = min(abs(bias) * 0.3, 2.0)
|
|
||||||
elif bias > 2:
|
|
||||||
k_ema = -min(abs(bias) * 0.3, 2.0)
|
|
||||||
return k_ema
|
|
||||||
|
|
||||||
def _k_amplitude_factor(self, amplitude: float) -> float:
|
|
||||||
if len(self._amplitude_buf) < 10:
|
|
||||||
return 0.0
|
|
||||||
buf = self._amplitude_buf[-10:]
|
|
||||||
mean = sum(buf) / len(buf)
|
|
||||||
if mean == 0:
|
|
||||||
return 0.0
|
|
||||||
ratio = (amplitude - mean) / mean
|
|
||||||
k_amp = 0.0
|
|
||||||
if ratio > 0.5:
|
|
||||||
k_amp = min(ratio * 1.5, 3.0)
|
|
||||||
elif ratio < -0.3:
|
|
||||||
k_amp = max(ratio * 1.5, -3.0)
|
|
||||||
return k_amp
|
|
||||||
|
|
||||||
def _detect_divergence(self, close: float, result: float) -> Tuple[bool, bool]:
|
|
||||||
"""简化背离检测(基于累计计数)"""
|
|
||||||
is_bull_div = False
|
|
||||||
is_bear_div = False
|
|
||||||
if len(self._close_buf) > 30:
|
|
||||||
c30 = self._close_buf[-30]
|
|
||||||
if close > c30 * 1.05 and result < 50:
|
|
||||||
is_bull_div = True
|
|
||||||
elif close < c30 * 0.95 and result > 50:
|
|
||||||
is_bear_div = True
|
|
||||||
return is_bull_div, is_bear_div
|
|
||||||
|
|
||||||
def _detect_trend(self, close: float) -> Tuple[bool, bool]:
|
|
||||||
"""简化趋势确认"""
|
|
||||||
is_bull = False
|
|
||||||
is_bear = False
|
|
||||||
if len(self._close_buf) > 20:
|
|
||||||
c20 = self._close_buf[-20]
|
|
||||||
if close > c20 * 1.05:
|
|
||||||
is_bull = True
|
|
||||||
elif close < c20 * 0.95:
|
|
||||||
is_bear = True
|
|
||||||
return is_bull, is_bear
|
|
||||||
|
|
||||||
def _wmacd(self) -> float:
|
|
||||||
"""简化加权MACD(基于缓冲区)"""
|
|
||||||
if len(self._close_buf) < 12:
|
|
||||||
return 0.0
|
|
||||||
ema12 = self._ema_val(self._close_buf, 12)
|
|
||||||
ema26 = self._ema_val(self._close_buf, 26)
|
|
||||||
return ema12 - ema26
|
|
||||||
|
|
||||||
def _boll_mid(self) -> float:
|
|
||||||
if len(self._close_buf) < 20:
|
|
||||||
return self._close_buf[-1] if self._close_buf else 0.0
|
|
||||||
return sum(self._close_buf[-20:]) / 20
|
|
||||||
|
|
||||||
def _ema_bias(self) -> float:
|
|
||||||
if not self._close_buf:
|
|
||||||
return 0.0
|
|
||||||
ema5 = self._ema_val(self._close_buf, 5)
|
|
||||||
ema10 = self._ema_val(self._close_buf, 10)
|
|
||||||
if ema10 == 0:
|
|
||||||
return 0.0
|
|
||||||
return (ema5 - ema10) / ema10 * 1000
|
|
||||||
|
|
||||||
def _boll_pct_b(self, close: float, upper: float, lower: float) -> float:
|
|
||||||
boll_len = upper - lower
|
|
||||||
if boll_len == 0:
|
|
||||||
return 50.0
|
|
||||||
return (close - lower) / boll_len * 100
|
|
||||||
|
|
||||||
|
|
||||||
def get_signals(indicator: Indicator) -> Tuple[str, str, str, str]:
|
|
||||||
"""
|
|
||||||
基于技术指标生成交易信号(逐帧调用版)
|
|
||||||
|
|
||||||
参数:
|
|
||||||
indicator: Indicator 对象,包含所有实时指标值
|
|
||||||
|
|
||||||
返回:
|
|
||||||
tuple: (market_status, signal_type, intensity, detail)
|
|
||||||
"""
|
|
||||||
# ─── 指标提取 ───
|
|
||||||
bbi = indicator.BBI
|
|
||||||
amplitude = indicator.AMPLITUDE
|
|
||||||
cci = indicator.CCI
|
|
||||||
close = indicator.CLOSE
|
|
||||||
dmk = indicator.DMK
|
|
||||||
high = indicator.HIGH
|
|
||||||
k = indicator.K
|
|
||||||
low = indicator.LOW
|
|
||||||
macd_val = indicator.MACD
|
|
||||||
ob = indicator.OB
|
|
||||||
os_ = indicator.OS
|
|
||||||
ovs = indicator.OVS
|
|
||||||
ovc = indicator.OVC
|
|
||||||
result = indicator.RESULT
|
|
||||||
wr = indicator.WR
|
|
||||||
percent = indicator.PERCENT
|
|
||||||
v0 = indicator.V0
|
|
||||||
boll_upper = indicator.BOLL_UP
|
|
||||||
boll_lower = indicator.BOLL_LO
|
|
||||||
bias = indicator.BIAS
|
|
||||||
|
|
||||||
# ─── 指标阈值 ───
|
|
||||||
ob_threshold = ob if ob > 0 else 80
|
|
||||||
os_threshold = os_ if os_ > 0 else 20
|
|
||||||
dist_extreme = ovc if ovc > 0 else 5
|
|
||||||
dist_far = ovs if ovs > 0 else 15
|
|
||||||
dist_mid = 30
|
|
||||||
macd_th = 0.3
|
|
||||||
rsi_ob = ovc if ovc > 0 else 70
|
|
||||||
rsi_os = ovs if ovs > 0 else 30
|
|
||||||
di_gap_bull = ovc if ovc > 0 else 15
|
|
||||||
di_gap_bear = -di_gap_bull
|
|
||||||
aroon_ob = ob_threshold
|
|
||||||
aroon_os = os_threshold
|
|
||||||
williams_ob = -20
|
|
||||||
williams_os = -80
|
|
||||||
bias_ob = 5
|
|
||||||
bias_os = -5
|
|
||||||
|
|
||||||
# ─── 指标因子 ───
|
|
||||||
pmacd = getattr(indicator, 'PMACD', macd_val)
|
|
||||||
|
|
||||||
k_macd = _k_macd_factor(ob_threshold, os_threshold, k, macd_val, pmacd)
|
|
||||||
k_di = _k_di_factor(dmk, amplitude, close)
|
|
||||||
k_aroon = _k_aroon_factor(aroon_ob, aroon_os, high, low, close)
|
|
||||||
k_williams = _k_williams_factor(williams_ob, williams_os, wr)
|
|
||||||
k_result = _k_result_factor(ob_threshold, os_threshold, result)
|
|
||||||
k_bias = _k_bias_factor(bias_ob, bias_os, bias)
|
|
||||||
|
|
||||||
# ─── K值累计 ───
|
|
||||||
k_bull = k_macd + k_di + k_aroon + k_williams + k_result + k_bias
|
|
||||||
k_bear = k_macd + k_di + k_aroon + k_williams + k_result + k_bias
|
|
||||||
|
|
||||||
if result > ob_threshold and k_bull > 0 and result >= 90:
|
|
||||||
k_bull *= 1.5
|
|
||||||
|
|
||||||
# ─── 强度计算 ───
|
|
||||||
max_k = max(abs(k_bull), abs(k_bear))
|
|
||||||
if max_k > 0:
|
|
||||||
buy_score = ((k_bull + max_k) / (2 * max_k)) * 100
|
|
||||||
sell_score = ((k_bear + max_k) / (2 * max_k)) * 100
|
|
||||||
else:
|
|
||||||
buy_score = sell_score = 50
|
|
||||||
|
|
||||||
# ─── 信号判断 ───
|
|
||||||
bull_t = buy_score > 70 and result < 90
|
|
||||||
bear_t = sell_score > 70 and result > 10
|
|
||||||
|
|
||||||
k_cci = cci / 300
|
|
||||||
boll_mid = indicator.BOLL_MID if hasattr(indicator, 'BOLL_MID') else (boll_upper + boll_lower) / 2
|
|
||||||
boll_len = boll_upper - boll_lower
|
|
||||||
|
|
||||||
is_bull_t = (
|
|
||||||
bull_t
|
|
||||||
and k_bull > k_cci
|
|
||||||
and close < boll_mid
|
|
||||||
and (
|
|
||||||
(result > 65 and result < 85 and k_bull > 0 and k_bear > 0 and (k_bear - k_bull < 1.5 or result > 75))
|
|
||||||
or (result < 35 and result > 15 and k_bear > 0 and k_bull > 0 and (k_bull - k_bear < 1.5 or result < 25))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
is_bear_t = (
|
|
||||||
bear_t
|
|
||||||
and k_bear > k_cci
|
|
||||||
and close > boll_mid
|
|
||||||
and (
|
|
||||||
(result > 65 and result < 85 and k_bull > 0 and k_bear > 0 and (k_bear - k_bull < 1.5 or result > 75))
|
|
||||||
or (result < 35 and result > 15 and k_bear > 0 and k_bull > 0 and (k_bull - k_bear < 1.5 or result < 25))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# ─── 信号强度 ───
|
|
||||||
sig_strength = 1.0
|
|
||||||
if is_bull_t:
|
|
||||||
sig_strength += 0.3 + max(0, (result - 70) / 30)
|
|
||||||
elif is_bear_t:
|
|
||||||
sig_strength += 0.3 + max(0, (30 - result) / 30)
|
|
||||||
|
|
||||||
strength = (
|
|
||||||
"极强" if sig_strength >= 1.7
|
|
||||||
else "强" if sig_strength >= 1.4
|
|
||||||
else "中" if sig_strength >= 1.1
|
|
||||||
else "弱"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ─── 信号类型 ───
|
|
||||||
if is_bull_t:
|
|
||||||
signal = f"买{strength}"
|
|
||||||
elif is_bear_t:
|
|
||||||
signal = f"卖{strength}"
|
|
||||||
else:
|
|
||||||
signal = "观望"
|
|
||||||
|
|
||||||
# ─── 市场状态 ───
|
|
||||||
if abs(buy_score - sell_score) < 10:
|
|
||||||
status = "中性震荡"
|
|
||||||
elif buy_score > sell_score:
|
|
||||||
if result > ob_threshold:
|
|
||||||
status = "高位企稳"
|
|
||||||
else:
|
|
||||||
status = "温和上涨"
|
|
||||||
else:
|
|
||||||
if result < os_threshold:
|
|
||||||
status = "低位企稳"
|
|
||||||
else:
|
|
||||||
status = "温和下跌"
|
|
||||||
|
|
||||||
# ─── 距离 ───
|
|
||||||
if boll_len > 0:
|
|
||||||
dist_ratio = (close - boll_lower) / boll_len * 100
|
|
||||||
else:
|
|
||||||
dist_ratio = 50
|
|
||||||
|
|
||||||
if dist_ratio < 50 - dist_extreme:
|
|
||||||
dist = "极端超卖"
|
|
||||||
elif dist_ratio < 50 - dist_far:
|
|
||||||
dist = "远离"
|
|
||||||
elif dist_ratio < 50 - dist_mid:
|
|
||||||
dist = "偏离"
|
|
||||||
elif dist_ratio < 50 + dist_mid:
|
|
||||||
dist = "接近"
|
|
||||||
elif dist_ratio < 50 + dist_far:
|
|
||||||
dist = "靠近"
|
|
||||||
elif dist_ratio < 50 + dist_extreme:
|
|
||||||
dist = "远超"
|
|
||||||
else:
|
|
||||||
dist = "极端超买"
|
|
||||||
|
|
||||||
# ─── 强度标签 ───
|
|
||||||
max_score = max(buy_score, sell_score)
|
|
||||||
intensity = (
|
|
||||||
"超强" if max_score >= 90
|
|
||||||
else "强" if max_score >= 80
|
|
||||||
else "中" if max_score >= 65
|
|
||||||
else "弱" if max_score >= 55
|
|
||||||
else "极弱"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ─── 详情 ───
|
|
||||||
ema5 = indicator.EMA5 if hasattr(indicator, 'EMA5') else close
|
|
||||||
ema10 = indicator.EMA10 if hasattr(indicator, 'EMA10') else close
|
|
||||||
ema20 = indicator.EMA20 if hasattr(indicator, 'EMA20') else close
|
|
||||||
bias_val = (ema5 - ema10) / ema10 * 1000 if ema10 != 0 else 0
|
|
||||||
|
|
||||||
bbp_val = (close - boll_lower) / boll_len * 100 if boll_len > 0 else 50
|
|
||||||
|
|
||||||
detail = (
|
|
||||||
f"前量:{percent:.1f} 数量:{int(amplitude):03d} 百分比:{bbp_val:.1f} "
|
|
||||||
f"正:{k_bull:.1f} 负:{k_bear:.1f}"
|
|
||||||
)
|
|
||||||
|
|
||||||
return status, signal, intensity, detail
|
|
||||||
@@ -460,6 +460,12 @@
|
|||||||
color: rgb(var(--hud-orange-rgb) / 0.96);
|
color: rgb(var(--hud-orange-rgb) / 0.96);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.window-controls {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.control-bar {
|
.control-bar {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.45rem;
|
gap: 0.45rem;
|
||||||
|
|||||||
@@ -461,6 +461,28 @@
|
|||||||
const heightField = new Float32Array(instanceCount);
|
const heightField = new Float32Array(instanceCount);
|
||||||
const compactField = new Uint16Array(instanceCount);
|
const compactField = new Uint16Array(instanceCount);
|
||||||
let lastFrameAt = performance.now();
|
let lastFrameAt = performance.now();
|
||||||
|
let lastStatsCurrent: number | null = null;
|
||||||
|
let lastStatsMax: number | null = null;
|
||||||
|
let lastStatsMin: number | null = null;
|
||||||
|
|
||||||
|
const syncStats = () => {
|
||||||
|
const nextCurrent = summary?.latest ?? null;
|
||||||
|
const nextMax = summary?.max ?? null;
|
||||||
|
const nextMin = summary?.min ?? null;
|
||||||
|
|
||||||
|
if (nextCurrent === lastStatsCurrent && nextMax === lastStatsMax && nextMin === lastStatsMin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastStatsCurrent = nextCurrent;
|
||||||
|
lastStatsMax = nextMax;
|
||||||
|
lastStatsMin = nextMin;
|
||||||
|
stats = {
|
||||||
|
current: nextCurrent,
|
||||||
|
max: nextMax,
|
||||||
|
min: nextMin
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const drawOverlay = () => {
|
const drawOverlay = () => {
|
||||||
if (!viewerEl || !overlayEl) {
|
if (!viewerEl || !overlayEl) {
|
||||||
@@ -623,12 +645,7 @@
|
|||||||
|
|
||||||
renderer.render(scene, camera);
|
renderer.render(scene, camera);
|
||||||
drawOverlay();
|
drawOverlay();
|
||||||
|
syncStats();
|
||||||
stats = {
|
|
||||||
current: summary?.latest ?? null,
|
|
||||||
max: summary?.max ?? null,
|
|
||||||
min: summary?.min ?? null
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -182,8 +182,7 @@
|
|||||||
transition:
|
transition:
|
||||||
opacity var(--fade-ms) cubic-bezier(0.18, 0.88, 0.3, 1),
|
opacity var(--fade-ms) cubic-bezier(0.18, 0.88, 0.3, 1),
|
||||||
transform var(--enter-ms) cubic-bezier(0.2, 0.9, 0.28, 1),
|
transform var(--enter-ms) cubic-bezier(0.2, 0.9, 0.28, 1),
|
||||||
border-color 460ms ease,
|
border-color 460ms ease;
|
||||||
filter 760ms ease;
|
|
||||||
transition-delay: calc(var(--panel-index) * 140ms);
|
transition-delay: calc(var(--panel-index) * 140ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +199,6 @@
|
|||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(var(--offset-x)) scale(0.98) rotate(-0.6deg);
|
transform: translateX(var(--offset-x)) scale(0.98) rotate(-0.6deg);
|
||||||
filter: blur(1.3px);
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition-delay: 0ms;
|
transition-delay: 0ms;
|
||||||
}
|
}
|
||||||
@@ -301,7 +299,6 @@
|
|||||||
stroke-width: 1.3;
|
stroke-width: 1.3;
|
||||||
stroke-linecap: round;
|
stroke-linecap: round;
|
||||||
stroke-linejoin: round;
|
stroke-linejoin: round;
|
||||||
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.42));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.series-line.tone-cyan {
|
.series-line.tone-cyan {
|
||||||
@@ -397,6 +394,10 @@
|
|||||||
aspect-ratio: 1.5 / 1;
|
aspect-ratio: 1.5 / 1;
|
||||||
min-block-size: 10.1rem;
|
min-block-size: 10.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chart-stage {
|
||||||
|
block-size: clamp(5.7rem, 7.6vw, 6.9rem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-height: 900px) {
|
@media (max-height: 900px) {
|
||||||
@@ -452,6 +453,17 @@
|
|||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
aspect-ratio: 1.7 / 1;
|
aspect-ratio: 1.7 / 1;
|
||||||
min-block-size: 0;
|
min-block-size: 0;
|
||||||
|
background: linear-gradient(160deg, rgb(var(--hud-surface-alt-rgb) / 0.86) 0%, rgb(var(--hud-surface-deep-rgb) / 0.9) 100%);
|
||||||
|
box-shadow: inset 0 0 0 1px rgb(var(--hud-border-strong-rgb) / 0.08), 0 0 8px rgb(var(--hud-glow-rgb) / 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-haze {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-stage {
|
||||||
|
background: linear-gradient(180deg, rgb(var(--hud-surface-alt-rgb) / 0.78), rgb(var(--hud-surface-deep-rgb) / 0.88));
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,22 +11,6 @@
|
|||||||
export let sessionStartedAt: number = Date.now();
|
export let sessionStartedAt: number = Date.now();
|
||||||
export let isRealtime = false;
|
export let isRealtime = false;
|
||||||
|
|
||||||
let currentTimeSeconds = 0;
|
|
||||||
let timerId: ReturnType<typeof setInterval> | null = null;
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
timerId = setInterval(() => {
|
|
||||||
currentTimeSeconds = Math.round((Date.now() - sessionStartedAt) / 100) / 10;
|
|
||||||
}, 200);
|
|
||||||
return () => {
|
|
||||||
if (timerId != null) clearInterval(timerId);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
$: i18n = locale === "zh-CN"
|
|
||||||
? { now: "当前", min: "最小", max: "最大", waiting: "等待数据" }
|
|
||||||
: { now: "Now", min: "Min", max: "Max", waiting: "Waiting" };
|
|
||||||
|
|
||||||
const viewportWidth = 120;
|
const viewportWidth = 120;
|
||||||
const viewportHeight = 48;
|
const viewportHeight = 48;
|
||||||
const plotInsetLeft = 13;
|
const plotInsetLeft = 13;
|
||||||
@@ -34,6 +18,8 @@
|
|||||||
const plotInsetTop = 4;
|
const plotInsetTop = 4;
|
||||||
const plotInsetBottom = 9;
|
const plotInsetBottom = 9;
|
||||||
const fixedYBounds = { min: 0, max: 25 };
|
const fixedYBounds = { min: 0, max: 25 };
|
||||||
|
const maxCanvasDpr = 1.5;
|
||||||
|
const minDrawIntervalMs = 66;
|
||||||
|
|
||||||
interface CurveSample {
|
interface CurveSample {
|
||||||
x: number;
|
x: number;
|
||||||
@@ -45,23 +31,25 @@
|
|||||||
y: number;
|
y: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AxisTick {
|
let canvasEl: HTMLCanvasElement | undefined;
|
||||||
value: number;
|
let chartStageEl: HTMLDivElement | undefined;
|
||||||
label: string;
|
let currentTimeSeconds = 0;
|
||||||
plotX: number;
|
let timerId: ReturnType<typeof setInterval> | null = null;
|
||||||
plotY: number;
|
let resizeObserver: ResizeObserver | null = null;
|
||||||
}
|
let drawRequestId: number | null = null;
|
||||||
|
let lastDrawAt = 0;
|
||||||
|
let mounted = false;
|
||||||
|
|
||||||
|
$: i18n = locale === "zh-CN"
|
||||||
|
? { now: "当前", min: "最小", max: "最大", waiting: "等待数据" }
|
||||||
|
: { now: "Now", min: "Min", max: "Max", waiting: "Waiting" };
|
||||||
|
|
||||||
function clamp(value: number, min: number, max: number): number {
|
function clamp(value: number, min: number, max: number): number {
|
||||||
return Math.min(max, Math.max(min, value));
|
return Math.min(max, Math.max(min, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatValue(value: number | null): string {
|
function formatValue(value: number | null): string {
|
||||||
if (value === null) {
|
return value === null ? "--" : value.toFixed(1);
|
||||||
return "--";
|
|
||||||
}
|
|
||||||
|
|
||||||
return value.toFixed(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatAxisValue(value: number, axis: "x" | "y"): string {
|
function formatAxisValue(value: number, axis: "x" | "y"): string {
|
||||||
@@ -73,6 +61,7 @@
|
|||||||
if (value < 60) {
|
if (value < 60) {
|
||||||
return `${value.toFixed(1)}s`;
|
return `${value.toFixed(1)}s`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mins = Math.floor(value / 60);
|
const mins = Math.floor(value / 60);
|
||||||
const secs = value - mins * 60;
|
const secs = value - mins * 60;
|
||||||
return `${mins}:${secs.toFixed(0).padStart(2, "0")}`;
|
return `${mins}:${secs.toFixed(0).padStart(2, "0")}`;
|
||||||
@@ -81,17 +70,6 @@
|
|||||||
return `${Math.round(value)} N`;
|
return `${Math.round(value)} N`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveDataBounds(values: number[]): { min: number; max: number } {
|
|
||||||
if (values.length === 0) {
|
|
||||||
return { min: 0, max: 1 };
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
min: Math.min(...values),
|
|
||||||
max: Math.max(...values)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveBounds(values: number[]): { min: number; max: number } {
|
function resolveBounds(values: number[]): { min: number; max: number } {
|
||||||
if (values.length === 0) {
|
if (values.length === 0) {
|
||||||
return { min: 0, max: 1 };
|
return { min: 0, max: 1 };
|
||||||
@@ -108,34 +86,23 @@
|
|||||||
return { min, max };
|
return { min, max };
|
||||||
}
|
}
|
||||||
|
|
||||||
function mapXToViewport(value: number, bounds: { min: number; max: number }): number {
|
function buildSamples(rawYValues: number[], rawXValues: number[], currentSeconds: number): CurveSample[] {
|
||||||
const span = bounds.max - bounds.min;
|
|
||||||
const chartWidth = viewportWidth - plotInsetLeft - plotInsetRight;
|
|
||||||
const ratio = span <= 0 ? 0.5 : (value - bounds.min) / span;
|
|
||||||
const mappedX = plotInsetLeft + ratio * chartWidth;
|
|
||||||
return Math.round(clamp(mappedX, plotInsetLeft, viewportWidth - plotInsetRight) * 100) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mapYToViewport(value: number, bounds: { min: number; max: number }): number {
|
|
||||||
const span = bounds.max - bounds.min;
|
|
||||||
const chartHeight = viewportHeight - plotInsetTop - plotInsetBottom;
|
|
||||||
const ratio = span <= 0 ? 0.5 : (value - bounds.min) / span;
|
|
||||||
const mappedY = viewportHeight - plotInsetBottom - ratio * chartHeight;
|
|
||||||
return Math.round(clamp(mappedY, plotInsetTop, viewportHeight - plotInsetBottom) * 100) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildSamples(rawYValues: number[], rawXValues: number[]): CurveSample[] {
|
|
||||||
if (!rawYValues.length) {
|
if (!rawYValues.length) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let previousX = 0;
|
const hasUsableXValues = rawXValues.length === rawYValues.length;
|
||||||
|
const realtimeSpacing = isRealtime
|
||||||
|
? Math.max(currentSeconds / Math.max(rawYValues.length - 1, 1), 0.1)
|
||||||
|
: 1;
|
||||||
|
const realtimeStart = isRealtime ? Math.max(0, currentSeconds - realtimeSpacing * (rawYValues.length - 1)) : 0;
|
||||||
|
let previousX = realtimeStart;
|
||||||
|
|
||||||
return rawYValues.map((rawY, index) => {
|
return rawYValues.map((rawY, index) => {
|
||||||
const x = rawXValues[index];
|
|
||||||
const y = Number.isFinite(rawY) ? Number(rawY) : 0;
|
const y = Number.isFinite(rawY) ? Number(rawY) : 0;
|
||||||
const fallbackX = index === 0 ? 0 : previousX + 1;
|
const rawX = rawXValues[index];
|
||||||
const resolvedX = Number.isFinite(x) ? Number(x) : fallbackX;
|
const fallbackX = isRealtime ? realtimeStart + index * realtimeSpacing : index + 1;
|
||||||
|
const resolvedX = hasUsableXValues && Number.isFinite(rawX) ? Number(rawX) : fallbackX;
|
||||||
const normalizedX = index === 0 ? resolvedX : Math.max(resolvedX, previousX);
|
const normalizedX = index === 0 ? resolvedX : Math.max(resolvedX, previousX);
|
||||||
previousX = normalizedX;
|
previousX = normalizedX;
|
||||||
return { x: normalizedX, y };
|
return { x: normalizedX, y };
|
||||||
@@ -143,132 +110,274 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveXScaleBounds(
|
function resolveXScaleBounds(
|
||||||
samples: CurveSample[],
|
samplesValue: CurveSample[],
|
||||||
currentSeconds: number,
|
currentSeconds: number,
|
||||||
realtime: boolean
|
realtime: boolean
|
||||||
): { min: number; max: number } {
|
): { min: number; max: number } {
|
||||||
if (samples.length === 0) {
|
if (samplesValue.length === 0) {
|
||||||
return { min: 0, max: 1 };
|
return { min: 0, max: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
const values = samples.map((sample) => sample.x);
|
|
||||||
const dataBounds = resolveBounds(values);
|
|
||||||
|
|
||||||
if (!realtime) {
|
if (!realtime) {
|
||||||
return dataBounds;
|
return resolveBounds(samplesValue.map((sample) => sample.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
const firstX = samples[0].x;
|
const firstX = samplesValue[0].x;
|
||||||
const lastX = samples[samples.length - 1].x;
|
const lastX = samplesValue[samplesValue.length - 1].x;
|
||||||
const axisMax = Math.max(lastX, currentSeconds);
|
const axisMax = Math.max(lastX, currentSeconds);
|
||||||
const positiveDiffs = samples
|
const dataSpan = Math.max(lastX - firstX, 1);
|
||||||
.slice(1)
|
const axisMin = Math.max(0, axisMax - dataSpan);
|
||||||
.map((sample, index) => sample.x - samples[index].x)
|
|
||||||
.filter((diff) => diff > 0);
|
|
||||||
const averageSpacing =
|
|
||||||
positiveDiffs.length > 0 ? positiveDiffs.reduce((sum, diff) => sum + diff, 0) / positiveDiffs.length : 1;
|
|
||||||
const dataSpan = Math.max(lastX - firstX, 0);
|
|
||||||
const windowSpan = Math.max(dataSpan, averageSpacing * Math.max(samples.length - 1, 1), 1);
|
|
||||||
const axisMin = Math.max(0, axisMax - windowSpan);
|
|
||||||
|
|
||||||
return resolveBounds([axisMin, axisMax]);
|
return resolveBounds([axisMin, axisMax]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mapXToViewport(value: number, bounds: { min: number; max: number }): number {
|
||||||
|
const span = bounds.max - bounds.min;
|
||||||
|
const chartWidth = viewportWidth - plotInsetLeft - plotInsetRight;
|
||||||
|
const ratio = span <= 0 ? 0.5 : (value - bounds.min) / span;
|
||||||
|
return clamp(plotInsetLeft + ratio * chartWidth, plotInsetLeft, viewportWidth - plotInsetRight);
|
||||||
|
}
|
||||||
|
|
||||||
|
function mapYToViewport(value: number, bounds: { min: number; max: number }): number {
|
||||||
|
const span = bounds.max - bounds.min;
|
||||||
|
const chartHeight = viewportHeight - plotInsetTop - plotInsetBottom;
|
||||||
|
const ratio = span <= 0 ? 0.5 : (value - bounds.min) / span;
|
||||||
|
return clamp(viewportHeight - plotInsetBottom - ratio * chartHeight, plotInsetTop, viewportHeight - plotInsetBottom);
|
||||||
|
}
|
||||||
|
|
||||||
function convertPoints(
|
function convertPoints(
|
||||||
samples: CurveSample[],
|
samplesValue: CurveSample[],
|
||||||
xBounds: { min: number; max: number },
|
xBounds: { min: number; max: number },
|
||||||
yBounds: { min: number; max: number }
|
yBounds: { min: number; max: number }
|
||||||
): PlotPoint[] {
|
): PlotPoint[] {
|
||||||
if (samples.length === 0) {
|
if (samplesValue.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (samples.length === 1) {
|
if (samplesValue.length === 1) {
|
||||||
return [{ x: viewportWidth / 2, y: viewportHeight / 2 }];
|
return [{ x: viewportWidth / 2, y: viewportHeight / 2 }];
|
||||||
}
|
}
|
||||||
|
|
||||||
return samples.map((sample) => {
|
return samplesValue.map((sample) => ({
|
||||||
return {
|
|
||||||
x: mapXToViewport(sample.x, xBounds),
|
x: mapXToViewport(sample.x, xBounds),
|
||||||
y: mapYToViewport(sample.y, yBounds)
|
y: mapYToViewport(sample.y, yBounds)
|
||||||
};
|
}));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildYAxisTicks(
|
function scaleCanvas(context: CanvasRenderingContext2D): { width: number; height: number; dpr: number } | null {
|
||||||
yScaleBounds: { min: number; max: number },
|
if (!canvasEl || !chartStageEl) {
|
||||||
_yDataBounds: { min: number; max: number }
|
return null;
|
||||||
): AxisTick[] {
|
}
|
||||||
|
|
||||||
|
const width = chartStageEl.clientWidth;
|
||||||
|
const height = chartStageEl.clientHeight;
|
||||||
|
const dpr = Math.min(window.devicePixelRatio || 1, maxCanvasDpr);
|
||||||
|
|
||||||
|
if (width <= 0 || height <= 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const nextWidth = Math.round(width * dpr);
|
||||||
|
const nextHeight = Math.round(height * dpr);
|
||||||
|
if (canvasEl.width !== nextWidth || canvasEl.height !== nextHeight) {
|
||||||
|
canvasEl.width = nextWidth;
|
||||||
|
canvasEl.height = nextHeight;
|
||||||
|
canvasEl.style.width = `${width}px`;
|
||||||
|
canvasEl.style.height = `${height}px`;
|
||||||
|
}
|
||||||
|
|
||||||
|
context.setTransform((width * dpr) / viewportWidth, 0, 0, (height * dpr) / viewportHeight, 0, 0);
|
||||||
|
return { width, height, dpr };
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawGrid(context: CanvasRenderingContext2D, yBounds: { min: number; max: number }): void {
|
||||||
const tickValues = [25, 20, 15, 10, 5, 0];
|
const tickValues = [25, 20, 15, 10, 5, 0];
|
||||||
return tickValues.map((value) => ({
|
|
||||||
value,
|
context.save();
|
||||||
label: formatAxisValue(value, "y"),
|
context.lineWidth = 0.45;
|
||||||
plotX: plotInsetLeft - 1.8,
|
context.strokeStyle = "rgb(128 170 180 / 0.18)";
|
||||||
plotY: mapYToViewport(value, yScaleBounds)
|
context.fillStyle = "rgb(190 216 220 / 0.78)";
|
||||||
}));
|
context.font = "600 3.2px system-ui, sans-serif";
|
||||||
|
context.textBaseline = "middle";
|
||||||
|
|
||||||
|
for (const tick of tickValues) {
|
||||||
|
const y = mapYToViewport(tick, yBounds);
|
||||||
|
context.beginPath();
|
||||||
|
context.moveTo(plotInsetLeft, y);
|
||||||
|
context.lineTo(viewportWidth - plotInsetRight, y);
|
||||||
|
context.stroke();
|
||||||
|
|
||||||
|
context.textAlign = "right";
|
||||||
|
context.fillText(formatAxisValue(tick, "y"), plotInsetLeft - 1.8, y + 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildXAxisTicks(xScaleBounds: { min: number; max: number }): AxisTick[] {
|
context.restore();
|
||||||
if (!Number.isFinite(xScaleBounds.min) || !Number.isFinite(xScaleBounds.max)) {
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const first = xScaleBounds.min;
|
function drawXAxis(context: CanvasRenderingContext2D, xBounds: { min: number; max: number }): void {
|
||||||
const middle = xScaleBounds.min + (xScaleBounds.max - xScaleBounds.min) / 2;
|
const first = xBounds.min;
|
||||||
const last = xScaleBounds.max;
|
const middle = xBounds.min + (xBounds.max - xBounds.min) / 2;
|
||||||
const tickValues = [first, middle, last];
|
const last = xBounds.max;
|
||||||
return tickValues.map((value) => ({
|
const ticks = [first, middle, last];
|
||||||
value,
|
|
||||||
label: formatAxisValue(value, "x"),
|
context.save();
|
||||||
plotX: mapXToViewport(value, xScaleBounds),
|
context.fillStyle = "rgb(190 216 220 / 0.82)";
|
||||||
plotY: viewportHeight - 0.9
|
context.font = "600 3.2px system-ui, sans-serif";
|
||||||
}));
|
context.textBaseline = "alphabetic";
|
||||||
|
|
||||||
|
ticks.forEach((tick, index) => {
|
||||||
|
const x = mapXToViewport(tick, xBounds);
|
||||||
|
context.textAlign = index === 0 ? "left" : index === ticks.length - 1 ? "right" : "center";
|
||||||
|
context.fillText(formatAxisValue(tick, "x"), x, viewportHeight - 0.9);
|
||||||
|
});
|
||||||
|
|
||||||
|
context.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createLinePath(points: PlotPoint[]): string {
|
function drawArea(context: CanvasRenderingContext2D, points: PlotPoint[]): void {
|
||||||
if (points.length === 0) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return points.map((point, index) => `${index === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" ");
|
|
||||||
}
|
|
||||||
|
|
||||||
function createAreaPath(points: PlotPoint[]): string {
|
|
||||||
if (points.length < 2) {
|
if (points.length < 2) {
|
||||||
return "";
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const linePath = createLinePath(points);
|
|
||||||
const firstPoint = points[0];
|
const firstPoint = points[0];
|
||||||
const lastPoint = points[points.length - 1];
|
const lastPoint = points[points.length - 1];
|
||||||
|
const gradient = context.createLinearGradient(0, plotInsetTop, 0, viewportHeight - plotInsetBottom);
|
||||||
|
gradient.addColorStop(0, "rgb(62 232 255 / 0.28)");
|
||||||
|
gradient.addColorStop(1, "rgb(62 232 255 / 0.02)");
|
||||||
|
|
||||||
return `${linePath} L ${lastPoint.x} ${viewportHeight - plotInsetBottom} L ${firstPoint.x} ${viewportHeight - plotInsetBottom} Z`;
|
context.save();
|
||||||
|
context.beginPath();
|
||||||
|
context.moveTo(firstPoint.x, firstPoint.y);
|
||||||
|
for (let index = 1; index < points.length; index += 1) {
|
||||||
|
context.lineTo(points[index].x, points[index].y);
|
||||||
|
}
|
||||||
|
context.lineTo(lastPoint.x, viewportHeight - plotInsetBottom);
|
||||||
|
context.lineTo(firstPoint.x, viewportHeight - plotInsetBottom);
|
||||||
|
context.closePath();
|
||||||
|
context.fillStyle = gradient;
|
||||||
|
context.fill();
|
||||||
|
context.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawLine(context: CanvasRenderingContext2D, points: PlotPoint[]): void {
|
||||||
|
if (!points.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
context.save();
|
||||||
|
context.lineWidth = 1.35;
|
||||||
|
context.lineCap = "round";
|
||||||
|
context.lineJoin = "round";
|
||||||
|
context.strokeStyle = "rgb(62 232 255 / 0.96)";
|
||||||
|
context.beginPath();
|
||||||
|
context.moveTo(points[0].x, points[0].y);
|
||||||
|
for (let index = 1; index < points.length; index += 1) {
|
||||||
|
context.lineTo(points[index].x, points[index].y);
|
||||||
|
}
|
||||||
|
context.stroke();
|
||||||
|
|
||||||
|
const lastPoint = points[points.length - 1];
|
||||||
|
context.fillStyle = "rgb(133 255 68 / 0.98)";
|
||||||
|
context.beginPath();
|
||||||
|
context.arc(lastPoint.x, lastPoint.y, 1.7, 0, Math.PI * 2);
|
||||||
|
context.fill();
|
||||||
|
context.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawCanvas(): void {
|
||||||
|
if (!canvasEl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const context = canvasEl.getContext("2d", { alpha: true });
|
||||||
|
if (!context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const scaled = scaleCanvas(context);
|
||||||
|
if (!scaled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
context.clearRect(0, 0, viewportWidth, viewportHeight);
|
||||||
|
|
||||||
|
if (sampleCount === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawGrid(context, yScaleBounds);
|
||||||
|
drawArea(context, plotPoints);
|
||||||
|
drawLine(context, plotPoints);
|
||||||
|
drawXAxis(context, xScaleBounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleDraw(): void {
|
||||||
|
if (!mounted || typeof window === "undefined") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drawRequestId != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawRequestId = window.requestAnimationFrame((timestamp) => {
|
||||||
|
drawRequestId = null;
|
||||||
|
|
||||||
|
if (lastDrawAt > 0 && timestamp - lastDrawAt < minDrawIntervalMs) {
|
||||||
|
scheduleDraw();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastDrawAt = timestamp;
|
||||||
|
drawCanvas();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$: sourceYValues = yValues && yValues.length ? yValues : summary.points;
|
$: sourceYValues = yValues && yValues.length ? yValues : summary.points;
|
||||||
$: sourceXValues = xValues && xValues.length ? xValues : summary.xValues ?? [];
|
$: sourceXValues = xValues && xValues.length ? xValues : summary.xValues ?? [];
|
||||||
$: samples = (() => {
|
$: samples = buildSamples(sourceYValues, sourceXValues, currentTimeSeconds);
|
||||||
const base = buildSamples(sourceYValues, sourceXValues);
|
|
||||||
if (isRealtime && base.length > 0 && currentTimeSeconds > 0) {
|
|
||||||
const lastSample = base[base.length - 1];
|
|
||||||
base[base.length - 1] = { ...lastSample, x: Math.max(lastSample.x, currentTimeSeconds) };
|
|
||||||
}
|
|
||||||
return base;
|
|
||||||
})();
|
|
||||||
$: sampleCount = samples.length;
|
$: sampleCount = samples.length;
|
||||||
$: xScaleBounds = resolveXScaleBounds(samples, currentTimeSeconds, isRealtime);
|
$: xScaleBounds = resolveXScaleBounds(samples, currentTimeSeconds, isRealtime);
|
||||||
$: yScaleBounds = fixedYBounds;
|
$: yScaleBounds = fixedYBounds;
|
||||||
$: xDataBounds = resolveDataBounds(samples.map((sample) => sample.x));
|
|
||||||
$: yDataBounds = resolveDataBounds(samples.map((sample) => sample.y));
|
|
||||||
$: plotPoints = convertPoints(samples, xScaleBounds, yScaleBounds);
|
$: plotPoints = convertPoints(samples, xScaleBounds, yScaleBounds);
|
||||||
$: linePath = createLinePath(plotPoints);
|
|
||||||
$: areaPath = createAreaPath(plotPoints);
|
|
||||||
$: lastPoint = plotPoints.length > 0 ? plotPoints[plotPoints.length - 1] : null;
|
|
||||||
$: yAxisTicks = sampleCount > 0 ? buildYAxisTicks(yScaleBounds, yDataBounds) : [];
|
|
||||||
$: xAxisTicks = sampleCount > 0 ? buildXAxisTicks(xScaleBounds) : [];
|
|
||||||
$: latestValue = formatValue(summary.latest);
|
$: latestValue = formatValue(summary.latest);
|
||||||
$: minValue = formatValue(summary.min);
|
$: minValue = formatValue(summary.min);
|
||||||
$: maxValue = formatValue(summary.max);
|
$: maxValue = formatValue(summary.max);
|
||||||
|
$: {
|
||||||
|
sampleCount;
|
||||||
|
plotPoints;
|
||||||
|
xScaleBounds;
|
||||||
|
locale;
|
||||||
|
scheduleDraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
mounted = true;
|
||||||
|
currentTimeSeconds = Math.round((Date.now() - sessionStartedAt) / 100) / 10;
|
||||||
|
scheduleDraw();
|
||||||
|
|
||||||
|
timerId = setInterval(() => {
|
||||||
|
if (!isRealtime) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentTimeSeconds = Math.round((Date.now() - sessionStartedAt) / 100) / 10;
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
if (chartStageEl) {
|
||||||
|
resizeObserver = new ResizeObserver(() => scheduleDraw());
|
||||||
|
resizeObserver.observe(chartStageEl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
mounted = false;
|
||||||
|
if (timerId != null) clearInterval(timerId);
|
||||||
|
if (drawRequestId != null) window.cancelAnimationFrame(drawRequestId);
|
||||||
|
resizeObserver?.disconnect();
|
||||||
|
timerId = null;
|
||||||
|
drawRequestId = null;
|
||||||
|
resizeObserver = null;
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<article
|
<article
|
||||||
@@ -290,52 +399,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="chart-stage">
|
<div class="chart-stage" bind:this={chartStageEl}>
|
||||||
<svg viewBox="0 0 {viewportWidth} {viewportHeight}" preserveAspectRatio="none" role="img" aria-label={summary.label}>
|
<canvas class="summary-canvas" bind:this={canvasEl} aria-label={summary.label}></canvas>
|
||||||
<defs>
|
|
||||||
<linearGradient id="summary-fill" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
||||||
<stop offset="0%" stop-color="rgb(62 232 255 / 0.28)" />
|
|
||||||
<stop offset="100%" stop-color="rgb(62 232 255 / 0.02)" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
|
|
||||||
<g class="grid-lines" aria-hidden="true">
|
|
||||||
{#each yAxisTicks as tick (`grid-${tick.value}`)}
|
|
||||||
<line x1={plotInsetLeft} y1={tick.plotY} x2={viewportWidth - plotInsetRight} y2={tick.plotY}></line>
|
|
||||||
{/each}
|
|
||||||
</g>
|
|
||||||
|
|
||||||
{#if areaPath}
|
|
||||||
<path d={areaPath} class="summary-area"></path>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if linePath}
|
|
||||||
<path d={linePath} class="summary-line"></path>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if lastPoint}
|
|
||||||
<circle cx={lastPoint.x} cy={lastPoint.y} r="1.7" class="summary-dot"></circle>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<g class="axis-labels" aria-hidden="true">
|
|
||||||
{#each yAxisTicks as tick, index (`y-${index}`)}
|
|
||||||
<text class="axis-label y-axis-label" x={tick.plotX} y={tick.plotY + 1.1} text-anchor="end">
|
|
||||||
{tick.label}
|
|
||||||
</text>
|
|
||||||
{/each}
|
|
||||||
|
|
||||||
{#each xAxisTicks as tick, index (`x-${index}`)}
|
|
||||||
<text
|
|
||||||
class="axis-label x-axis-label"
|
|
||||||
x={tick.plotX}
|
|
||||||
y={tick.plotY}
|
|
||||||
text-anchor={index === 0 ? "start" : index === xAxisTicks.length - 1 ? "end" : "middle"}
|
|
||||||
>
|
|
||||||
{tick.label}
|
|
||||||
</text>
|
|
||||||
{/each}
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
{#if sampleCount === 0}
|
{#if sampleCount === 0}
|
||||||
<div class="empty-state">
|
<div class="empty-state">
|
||||||
@@ -389,8 +454,7 @@
|
|||||||
transition:
|
transition:
|
||||||
opacity var(--fade-ms) cubic-bezier(0.18, 0.88, 0.3, 1),
|
opacity var(--fade-ms) cubic-bezier(0.18, 0.88, 0.3, 1),
|
||||||
transform var(--enter-ms) cubic-bezier(0.2, 0.9, 0.28, 1),
|
transform var(--enter-ms) cubic-bezier(0.2, 0.9, 0.28, 1),
|
||||||
border-color 460ms ease,
|
border-color 460ms ease;
|
||||||
filter 760ms ease;
|
|
||||||
transition-delay: calc(var(--panel-index) * 140ms);
|
transition-delay: calc(var(--panel-index) * 140ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,53 +544,12 @@
|
|||||||
radial-gradient(circle at 50% 0, rgb(var(--hud-glow-rgb) / 0.09), transparent 45%);
|
radial-gradient(circle at 50% 0, rgb(var(--hud-glow-rgb) / 0.09), transparent 45%);
|
||||||
}
|
}
|
||||||
|
|
||||||
svg {
|
.summary-canvas {
|
||||||
display: block;
|
display: block;
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-lines line {
|
|
||||||
stroke: rgb(var(--hud-border-strong-rgb) / 0.16);
|
|
||||||
stroke-width: 0.45;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-area {
|
|
||||||
fill: url(#summary-fill);
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-line {
|
|
||||||
fill: none;
|
|
||||||
stroke: rgb(var(--hud-cyan-rgb) / 0.96);
|
|
||||||
stroke-width: 1.35;
|
|
||||||
stroke-linecap: round;
|
|
||||||
stroke-linejoin: round;
|
|
||||||
filter: drop-shadow(0 0 4px rgb(var(--hud-cyan-rgb) / 0.22));
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-dot {
|
|
||||||
fill: rgb(var(--hud-lime-rgb) / 0.98);
|
|
||||||
filter: drop-shadow(0 0 6px rgb(var(--hud-lime-rgb) / 0.3));
|
|
||||||
}
|
|
||||||
|
|
||||||
.axis-label {
|
|
||||||
fill: rgb(var(--hud-text-main-rgb) / 0.88);
|
|
||||||
font-size: 3.2px;
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
text-shadow:
|
|
||||||
0 1px 0 rgb(0 0 0 / 0.46),
|
|
||||||
0 0 4px rgb(0 0 0 / 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.y-axis-label {
|
|
||||||
fill: rgb(var(--hud-text-dim-rgb) / 0.84);
|
|
||||||
}
|
|
||||||
|
|
||||||
.x-axis-label {
|
|
||||||
fill: rgb(var(--hud-text-dim-rgb) / 0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
@@ -637,6 +660,12 @@
|
|||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.signal-panel {
|
.signal-panel {
|
||||||
inline-size: 100%;
|
inline-size: 100%;
|
||||||
|
background: linear-gradient(160deg, rgb(var(--hud-surface-alt-rgb) / 0.86) 0%, rgb(var(--hud-surface-deep-rgb) / 0.9) 100%);
|
||||||
|
box-shadow: inset 0 0 0 1px rgb(var(--hud-border-strong-rgb) / 0.08), 0 0 8px rgb(var(--hud-glow-rgb) / 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-stage {
|
||||||
|
background: linear-gradient(180deg, rgb(var(--hud-surface-alt-rgb) / 0.78), rgb(var(--hud-surface-deep-rgb) / 0.88));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -44,6 +44,29 @@
|
|||||||
dtsMs: number;
|
dtsMs: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface AndroidUsbSerialDevice {
|
||||||
|
name: string;
|
||||||
|
vendorId: number;
|
||||||
|
productId: number;
|
||||||
|
manufacturer: string;
|
||||||
|
product: string;
|
||||||
|
serial: string;
|
||||||
|
hasPermission: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AndroidUsbSerialListResult {
|
||||||
|
devices: AndroidUsbSerialDevice[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AndroidUsbSerialOpenResult {
|
||||||
|
fd: number;
|
||||||
|
name: string;
|
||||||
|
vendorId: number;
|
||||||
|
productId: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
type AndroidUsbSerialCommand = "list" | "open" | "close";
|
||||||
|
|
||||||
const copyByLocale: Record<LocaleCode, HudCopy> = {
|
const copyByLocale: Record<LocaleCode, HudCopy> = {
|
||||||
"zh-CN": {
|
"zh-CN": {
|
||||||
appName: "JE-Skin",
|
appName: "JE-Skin",
|
||||||
@@ -168,6 +191,7 @@
|
|||||||
const pointsPerSeries = 28;
|
const pointsPerSeries = 28;
|
||||||
const summaryPointsPerSeries = 42;
|
const summaryPointsPerSeries = 42;
|
||||||
const signalRenderTickMs = 1200;
|
const signalRenderTickMs = 1200;
|
||||||
|
const hudRealtimeRenderMs = 33;
|
||||||
const replayDefaultFrameMs = 40;
|
const replayDefaultFrameMs = 40;
|
||||||
const showSignalPanels = false;
|
const showSignalPanels = false;
|
||||||
const mockToneCycle: SignalTone[] = ["cyan", "lime", "orange", "violet", "gold", "rose"];
|
const mockToneCycle: SignalTone[] = ["cyan", "lime", "orange", "violet", "gold", "rose"];
|
||||||
@@ -203,6 +227,7 @@
|
|||||||
let connectionState: ConnectionState = "offline";
|
let connectionState: ConnectionState = "offline";
|
||||||
let serialPortValue = "COM14";
|
let serialPortValue = "COM14";
|
||||||
let serialPortOptions = ["COM4", "COM9", "COM14", "COM16"];
|
let serialPortOptions = ["COM4", "COM9", "COM14", "COM16"];
|
||||||
|
let androidUsbSerialDevices: AndroidUsbSerialDevice[] = [];
|
||||||
let isRefreshingPorts = false;
|
let isRefreshingPorts = false;
|
||||||
let connectionNotice = "";
|
let connectionNotice = "";
|
||||||
let connectionNoticeTone: HudNoticeTone = "info";
|
let connectionNoticeTone: HudNoticeTone = "info";
|
||||||
@@ -261,6 +286,9 @@
|
|||||||
} | null = null;
|
} | null = null;
|
||||||
let devkitStatusTimer: number | null = null;
|
let devkitStatusTimer: number | null = null;
|
||||||
let sessionStartedAt: number = Date.now();
|
let sessionStartedAt: number = Date.now();
|
||||||
|
let pendingHudPacket: HudPacket | null = null;
|
||||||
|
let hudFrameRequestId: number | null = null;
|
||||||
|
let lastHudRenderAt = 0;
|
||||||
|
|
||||||
$: uiCopy = copyByLocale[locale];
|
$: uiCopy = copyByLocale[locale];
|
||||||
$: configLinks = buildConfigLinks(
|
$: configLinks = buildConfigLinks(
|
||||||
@@ -287,6 +315,66 @@
|
|||||||
return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
|
return typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isAndroidRuntime(): boolean {
|
||||||
|
if (!isTauriRuntime() || typeof navigator === "undefined") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return /Android/i.test(navigator.userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatAndroidUsbSerialLabel(device: AndroidUsbSerialDevice): string {
|
||||||
|
const product = device.product || device.manufacturer || "USB Serial";
|
||||||
|
const ids = `${device.vendorId.toString(16).padStart(4, "0")}:${device.productId
|
||||||
|
.toString(16)
|
||||||
|
.padStart(4, "0")}`;
|
||||||
|
return `${product} (${ids})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function findAndroidUsbSerialDevice(name: string): AndroidUsbSerialDevice | null {
|
||||||
|
return androidUsbSerialDevices.find((device) => device.name === name) ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeAndroidUsbSerialDevices(value: unknown): AndroidUsbSerialDevice[] {
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
return value.filter((device): device is AndroidUsbSerialDevice => {
|
||||||
|
return typeof device === "object" && device !== null && typeof (device as AndroidUsbSerialDevice).name === "string";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof value === "object" && value !== null) {
|
||||||
|
return Object.values(value).filter((device): device is AndroidUsbSerialDevice => {
|
||||||
|
return typeof device === "object" && device !== null && typeof (device as AndroidUsbSerialDevice).name === "string";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
async function invokeAndroidUsbSerial<T>(
|
||||||
|
command: AndroidUsbSerialCommand,
|
||||||
|
args?: Record<string, unknown>
|
||||||
|
): Promise<T> {
|
||||||
|
const commandNames: Record<AndroidUsbSerialCommand, [string, string]> = {
|
||||||
|
list: ["usb_serial_list", "usbSerialList"],
|
||||||
|
open: ["usb_serial_open", "usbSerialOpen"],
|
||||||
|
close: ["usb_serial_close", "usbSerialClose"]
|
||||||
|
};
|
||||||
|
|
||||||
|
const [primary, fallback] = commandNames[command];
|
||||||
|
|
||||||
|
try {
|
||||||
|
return await invoke<T>(`plugin:usb-serial|${primary}`, args);
|
||||||
|
} catch (error) {
|
||||||
|
const message = String(error);
|
||||||
|
if (!message.includes("No command")) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await invoke<T>(`plugin:usb-serial|${fallback}`, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function clamp(value: number, min: number, max: number): number {
|
function clamp(value: number, min: number, max: number): number {
|
||||||
return Math.min(max, Math.max(min, value));
|
return Math.min(max, Math.max(min, value));
|
||||||
}
|
}
|
||||||
@@ -726,12 +814,10 @@
|
|||||||
const safeIndex = clamp(index, 0, replayFrames.length - 1);
|
const safeIndex = clamp(index, 0, replayFrames.length - 1);
|
||||||
const startIndex = Math.max(0, safeIndex - summaryPointsPerSeries + 1);
|
const startIndex = Math.max(0, safeIndex - summaryPointsPerSeries + 1);
|
||||||
const points: number[] = [];
|
const points: number[] = [];
|
||||||
const xSeconds: number[] = [];
|
|
||||||
for (let cursor = startIndex; cursor <= safeIndex; cursor += 1) {
|
for (let cursor = startIndex; cursor <= safeIndex; cursor += 1) {
|
||||||
points.push(replayFrameTotal(replayFrames[cursor]));
|
points.push(replayFrameTotal(replayFrames[cursor]));
|
||||||
xSeconds.push(replayFrames[cursor].dtsMs / 1000);
|
|
||||||
}
|
}
|
||||||
return buildSummary(points, xSeconds);
|
return buildSummary(points);
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyReplayFrame(index: number): void {
|
function applyReplayFrame(index: number): void {
|
||||||
@@ -744,7 +830,9 @@
|
|||||||
replayHasDisplayedFrame = true;
|
replayHasDisplayedFrame = true;
|
||||||
replayProgress = replayFrames.length > 1 ? safeIndex / (replayFrames.length - 1) : 1;
|
replayProgress = replayFrames.length > 1 ? safeIndex / (replayFrames.length - 1) : 1;
|
||||||
pressureMatrix = frameValuesToMatrix(replayFrames[safeIndex].values);
|
pressureMatrix = frameValuesToMatrix(replayFrames[safeIndex].values);
|
||||||
|
if (signalPanels.length > 0) {
|
||||||
signalPanels = buildInactivePanels();
|
signalPanels = buildInactivePanels();
|
||||||
|
}
|
||||||
summary = buildReplaySummaryAt(safeIndex);
|
summary = buildReplaySummaryAt(safeIndex);
|
||||||
hasSignalData = true;
|
hasSignalData = true;
|
||||||
}
|
}
|
||||||
@@ -903,7 +991,6 @@
|
|||||||
function buildEmptySummary(): HudSummary {
|
function buildEmptySummary(): HudSummary {
|
||||||
return {
|
return {
|
||||||
label: "Resultant Force",
|
label: "Resultant Force",
|
||||||
xValues: [],
|
|
||||||
points: [],
|
points: [],
|
||||||
latest: null,
|
latest: null,
|
||||||
min: null,
|
min: null,
|
||||||
@@ -923,19 +1010,13 @@
|
|||||||
return shouldHideSummary(summaryValue.points) ? buildEmptySummary() : summaryValue;
|
return shouldHideSummary(summaryValue.points) ? buildEmptySummary() : summaryValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildSummary(points: number[], xValues: number[] = []): HudSummary {
|
function buildSummary(points: number[]): HudSummary {
|
||||||
if (points.length === 0) {
|
if (points.length === 0) {
|
||||||
return buildEmptySummary();
|
return buildEmptySummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
const resolvedXValues = points.map((_, index) => {
|
|
||||||
const x = xValues[index];
|
|
||||||
return Number.isFinite(x) ? Number(x) : index + 1;
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
label: "Resultant Force",
|
label: "Resultant Force",
|
||||||
xValues: resolvedXValues,
|
|
||||||
points,
|
points,
|
||||||
latest: points[points.length - 1],
|
latest: points[points.length - 1],
|
||||||
min: Math.min(...points),
|
min: Math.min(...points),
|
||||||
@@ -960,21 +1041,13 @@
|
|||||||
? summaryValue.points[summaryValue.points.length - 1]
|
? summaryValue.points[summaryValue.points.length - 1]
|
||||||
: randomBetween(280, 1600);
|
: randomBetween(280, 1600);
|
||||||
const next = Math.round(clamp(previous + randomBetween(-160, 160), 120, 2400) * 10) / 10;
|
const next = Math.round(clamp(previous + randomBetween(-160, 160), 120, 2400) * 10) / 10;
|
||||||
const nowSeconds = Math.round((Date.now() - sessionStartedAt) / 100) / 10;
|
|
||||||
const previousXValues =
|
|
||||||
summaryValue.xValues && summaryValue.xValues.length === summaryValue.points.length
|
|
||||||
? summaryValue.xValues
|
|
||||||
: summaryValue.points.map((_, index) => nowSeconds);
|
|
||||||
const points =
|
const points =
|
||||||
summaryValue.points.length >= summaryPointsPerSeries
|
summaryValue.points.length >= summaryPointsPerSeries
|
||||||
? summaryValue.points.slice(1)
|
? summaryValue.points.slice(1)
|
||||||
: summaryValue.points.slice();
|
: summaryValue.points.slice();
|
||||||
const xValues =
|
|
||||||
previousXValues.length >= summaryPointsPerSeries ? previousXValues.slice(1) : previousXValues.slice();
|
|
||||||
|
|
||||||
points.push(next);
|
points.push(next);
|
||||||
xValues.push(nowSeconds);
|
return buildSummary(points);
|
||||||
return buildSummary(points, xValues);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildInactivePanels(): HudSignalPanel[] {
|
function buildInactivePanels(): HudSignalPanel[] {
|
||||||
@@ -985,23 +1058,66 @@
|
|||||||
if (replayHasData) {
|
if (replayHasData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
signalPanels = showSignalPanels ? packet.panels : buildInactivePanels();
|
if (showSignalPanels) {
|
||||||
if (packet.summary.points.length > 0) {
|
signalPanels = packet.panels;
|
||||||
const nowSeconds = Math.round((Date.now() - sessionStartedAt) / 100) / 10;
|
} else if (signalPanels.length > 0) {
|
||||||
const pointCount = packet.summary.points.length;
|
signalPanels = buildInactivePanels();
|
||||||
const spacing =
|
|
||||||
pointCount > 1 ? Math.min(1.2, nowSeconds / Math.max(pointCount - 1, 1)) : 0;
|
|
||||||
const startX = Math.max(0, nowSeconds - spacing * Math.max(pointCount - 1, 0));
|
|
||||||
const xValues = packet.summary.points.map((_, index) => Math.round((startX + index * spacing) * 10) / 10);
|
|
||||||
summary = { ...packet.summary, xValues };
|
|
||||||
} else {
|
|
||||||
summary = packet.summary;
|
|
||||||
}
|
}
|
||||||
|
summary = packet.summary;
|
||||||
pressureMatrix = packet.pressureMatrix;
|
pressureMatrix = packet.pressureMatrix;
|
||||||
hasSignalData = signalPanels.length > 0 || packet.summary.points.length > 0;
|
hasSignalData = signalPanels.length > 0 || packet.summary.points.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFrameClock(): number {
|
||||||
|
return typeof performance !== "undefined" ? performance.now() : Date.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelPendingHudPacket(): void {
|
||||||
|
pendingHudPacket = null;
|
||||||
|
if (hudFrameRequestId != null && typeof window !== "undefined") {
|
||||||
|
window.cancelAnimationFrame(hudFrameRequestId);
|
||||||
|
hudFrameRequestId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function scheduleHudPacketFlush(): void {
|
||||||
|
if (hudFrameRequestId != null || typeof window === "undefined") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
hudFrameRequestId = window.requestAnimationFrame(flushPendingHudPacket);
|
||||||
|
}
|
||||||
|
|
||||||
|
function flushPendingHudPacket(timestamp: number = getFrameClock()): void {
|
||||||
|
hudFrameRequestId = null;
|
||||||
|
|
||||||
|
if (!pendingHudPacket) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const elapsed = timestamp - lastHudRenderAt;
|
||||||
|
if (lastHudRenderAt > 0 && elapsed < hudRealtimeRenderMs) {
|
||||||
|
scheduleHudPacketFlush();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const packet = pendingHudPacket;
|
||||||
|
pendingHudPacket = null;
|
||||||
|
lastHudRenderAt = timestamp;
|
||||||
|
applyPacket(packet);
|
||||||
|
}
|
||||||
|
|
||||||
|
function enqueueHudPacket(packet: HudPacket): void {
|
||||||
|
if (replayHasData) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pendingHudPacket = packet;
|
||||||
|
scheduleHudPacketFlush();
|
||||||
|
}
|
||||||
|
|
||||||
function clearHudPanels(): void {
|
function clearHudPanels(): void {
|
||||||
|
cancelPendingHudPacket();
|
||||||
hasSignalData = false;
|
hasSignalData = false;
|
||||||
signalPanels = buildInactivePanels();
|
signalPanels = buildInactivePanels();
|
||||||
summary = buildEmptySummary();
|
summary = buildEmptySummary();
|
||||||
@@ -1221,6 +1337,10 @@
|
|||||||
|
|
||||||
function handlePortChange(event: CustomEvent<string>): void {
|
function handlePortChange(event: CustomEvent<string>): void {
|
||||||
serialPortValue = event.detail;
|
serialPortValue = event.detail;
|
||||||
|
if (isAndroidRuntime()) {
|
||||||
|
const selectedDevice = findAndroidUsbSerialDevice(serialPortValue);
|
||||||
|
deviceValue = selectedDevice ? formatAndroidUsbSerialLabel(selectedDevice) : "Android USB Serial";
|
||||||
|
}
|
||||||
connectionState = "offline";
|
connectionState = "offline";
|
||||||
connectionNotice = "";
|
connectionNotice = "";
|
||||||
clearHudPanels();
|
clearHudPanels();
|
||||||
@@ -1256,7 +1376,7 @@
|
|||||||
case "InvalidConfig":
|
case "InvalidConfig":
|
||||||
return "当前串口配置无效,请重新选择端口。";
|
return "当前串口配置无效,请重新选择端口。";
|
||||||
default:
|
default:
|
||||||
return "串口连接失败,请稍后重试。";
|
return `串口连接失败:${errorCode}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1277,7 +1397,7 @@
|
|||||||
case "InvalidConfig":
|
case "InvalidConfig":
|
||||||
return "The selected serial port is invalid. Choose another port.";
|
return "The selected serial port is invalid. Choose another port.";
|
||||||
default:
|
default:
|
||||||
return "Connection failed. Please try again.";
|
return `Connection failed: ${errorCode}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1288,14 +1408,16 @@
|
|||||||
const errorCode = normalizeInvokeError(error);
|
const errorCode = normalizeInvokeError(error);
|
||||||
|
|
||||||
if (locale === "zh-CN") {
|
if (locale === "zh-CN") {
|
||||||
return errorCode === "ScanError"
|
if (errorCode === "ScanError") {
|
||||||
? "串口列表刷新失败,请确认系统串口服务正常。"
|
return "串口列表刷新失败,请确认系统串口服务正常。";
|
||||||
: "刷新串口列表失败,请稍后重试。";
|
}
|
||||||
|
|
||||||
|
return `刷新串口列表失败:${errorCode}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return errorCode === "ScanError"
|
return errorCode === "ScanError"
|
||||||
? "Refreshing serial ports failed. Check whether the OS serial service is available."
|
? "Refreshing serial ports failed. Check whether the OS serial service is available."
|
||||||
: "Refreshing serial ports failed. Please try again.";
|
: `Refreshing serial ports failed: ${errorCode}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveExportNotice(error: unknown): string {
|
function resolveExportNotice(error: unknown): string {
|
||||||
@@ -1350,6 +1472,33 @@
|
|||||||
isRefreshingPorts = true;
|
isRefreshingPorts = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
try {
|
||||||
|
const result = await invokeAndroidUsbSerial<AndroidUsbSerialListResult>("list");
|
||||||
|
androidUsbSerialDevices = normalizeAndroidUsbSerialDevices(result.devices);
|
||||||
|
serialPortOptions = androidUsbSerialDevices.map((device) => device.name);
|
||||||
|
|
||||||
|
if (serialPortOptions.includes(serialPortValue)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
serialPortValue = serialPortOptions[0] ?? "";
|
||||||
|
const selectedDevice = findAndroidUsbSerialDevice(serialPortValue);
|
||||||
|
deviceValue = selectedDevice ? formatAndroidUsbSerialLabel(selectedDevice) : "Android USB Serial";
|
||||||
|
|
||||||
|
if (!serialPortValue) {
|
||||||
|
connectionState = "offline";
|
||||||
|
clearHudPanels();
|
||||||
|
connectionNotice =
|
||||||
|
locale === "zh-CN" ? "未发现 USB 串口设备,请确认已通过 OTG 接入设备。" : "No USB serial device found.";
|
||||||
|
connectionNoticeTone = "warn";
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} catch (androidError) {
|
||||||
|
if (isAndroidRuntime()) {
|
||||||
|
throw androidError;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const ports = await invoke<string[]>("serial_enum");
|
const ports = await invoke<string[]>("serial_enum");
|
||||||
serialPortOptions = ports;
|
serialPortOptions = ports;
|
||||||
|
|
||||||
@@ -1390,7 +1539,28 @@
|
|||||||
connectionNotice = "";
|
connectionNotice = "";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await invoke<SerialConnectResult>("serial_connect", { port: event.detail });
|
let result: SerialConnectResult;
|
||||||
|
|
||||||
|
if (isAndroidRuntime()) {
|
||||||
|
const selectedDevice = findAndroidUsbSerialDevice(event.detail);
|
||||||
|
const opened = await invokeAndroidUsbSerial<AndroidUsbSerialOpenResult>("open", {
|
||||||
|
name: event.detail,
|
||||||
|
vendorId: selectedDevice?.vendorId,
|
||||||
|
productId: selectedDevice?.productId
|
||||||
|
});
|
||||||
|
result = await invoke<SerialConnectResult>("serial_connect_fd", {
|
||||||
|
fd: opened.fd,
|
||||||
|
deviceName: opened.name,
|
||||||
|
device_name: opened.name
|
||||||
|
});
|
||||||
|
const openedDevice = findAndroidUsbSerialDevice(opened.name) ?? selectedDevice;
|
||||||
|
deviceValue = openedDevice
|
||||||
|
? formatAndroidUsbSerialLabel(openedDevice)
|
||||||
|
: `USB Serial (${opened.vendorId.toString(16)}:${opened.productId.toString(16)})`;
|
||||||
|
} else {
|
||||||
|
result = await invoke<SerialConnectResult>("serial_connect", { port: event.detail });
|
||||||
|
}
|
||||||
|
|
||||||
connectionState = result.connected ? "online" : "offline";
|
connectionState = result.connected ? "online" : "offline";
|
||||||
serialPortValue = result.port;
|
serialPortValue = result.port;
|
||||||
connectionNotice = "";
|
connectionNotice = "";
|
||||||
@@ -1398,6 +1568,13 @@
|
|||||||
clearHudPanels();
|
clearHudPanels();
|
||||||
console.info("[serial] connect result:", result.message);
|
console.info("[serial] connect result:", result.message);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if (isAndroidRuntime()) {
|
||||||
|
try {
|
||||||
|
await invokeAndroidUsbSerial("close");
|
||||||
|
} catch (closeError) {
|
||||||
|
console.warn("USB serial close after failed connect failed:", closeError);
|
||||||
|
}
|
||||||
|
}
|
||||||
connectionState = "offline";
|
connectionState = "offline";
|
||||||
connectionNotice = resolveSerialNotice(error, "connect");
|
connectionNotice = resolveSerialNotice(error, "connect");
|
||||||
connectionNoticeTone = "warn";
|
connectionNoticeTone = "warn";
|
||||||
@@ -1409,6 +1586,9 @@
|
|||||||
async function handleSerialDisconnect(): Promise<void> {
|
async function handleSerialDisconnect(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const result = await invoke<SerialConnectResult>("serial_disconnect");
|
const result = await invoke<SerialConnectResult>("serial_disconnect");
|
||||||
|
if (isAndroidRuntime()) {
|
||||||
|
await invokeAndroidUsbSerial("close");
|
||||||
|
}
|
||||||
connectionState = result.connected ? "online" : "offline";
|
connectionState = result.connected ? "online" : "offline";
|
||||||
connectionNotice = "";
|
connectionNotice = "";
|
||||||
connectionNoticeTone = "info";
|
connectionNoticeTone = "info";
|
||||||
@@ -1758,7 +1938,7 @@
|
|||||||
void checkForAppUpdate();
|
void checkForAppUpdate();
|
||||||
void pollDevKitStatus();
|
void pollDevKitStatus();
|
||||||
devkitStatusTimer = window.setInterval(() => void pollDevKitStatus(), 3000);
|
devkitStatusTimer = window.setInterval(() => void pollDevKitStatus(), 3000);
|
||||||
void startTauriHudStream(applyPacket)
|
void startTauriHudStream(enqueueHudPacket)
|
||||||
.then((unlisten) => {
|
.then((unlisten) => {
|
||||||
if (disposed) {
|
if (disposed) {
|
||||||
unlisten();
|
unlisten();
|
||||||
@@ -1788,11 +1968,12 @@
|
|||||||
console.error("Failed to listen for devkit_pzt_angle:", error);
|
console.error("Failed to listen for devkit_pzt_angle:", error);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
stopMockFeed = startMockFeed(applyPacket);
|
stopMockFeed = startMockFeed(enqueueHudPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
disposed = true;
|
disposed = true;
|
||||||
|
cancelPendingHudPacket();
|
||||||
pauseReplayPlayback();
|
pauseReplayPlayback();
|
||||||
stopMockFeed?.();
|
stopMockFeed?.();
|
||||||
unlistenHudStream?.();
|
unlistenHudStream?.();
|
||||||
@@ -2014,6 +2195,27 @@
|
|||||||
mix-blend-mode: soft-light;
|
mix-blend-mode: soft-light;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.hud-noise {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hud-vignette {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hud-gradient {
|
||||||
|
background:
|
||||||
|
linear-gradient(170deg, var(--hud-bg-20) 0%, var(--hud-bg-10) 56%, var(--hud-bg-30) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hud-layout {
|
||||||
|
gap: clamp(0.3rem, 1vw, 0.6rem);
|
||||||
|
padding: clamp(0.4rem, 1.2vw, 0.8rem);
|
||||||
|
box-shadow: inset 0 -12px 24px rgb(0 0 0 / 0.24);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.hud-layout {
|
.hud-layout {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|||||||