chore: edit config

pull/7/head
ERR0RPR0MPT 2024-04-13 02:17:34 +08:00
parent a11ea85938
commit 760b44d586
7 changed files with 7 additions and 18 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
/__pycache__
/test/
/app/
/main_test.py
/start_test.bat

View File

@ -5,9 +5,9 @@
## 使用方法
1. 打开任意P图工具, 准备一个和设备屏幕大小相同的一张图片(例如:1600x2560), 将 `./image/color_exp_panel.png`
放置到该图片圆形触摸区域的位置(或者可以参考`./image/image_monitor_edit3.png`的做法), 编辑好的图片放到脚本目录下取名 `image_monitor.png`.
放置到该图片圆形触摸区域的位置(或者可以参考`./image/image_monitor_edit3.png`的做法), 编辑好的图片放到脚本 `image` 目录下取名 `image_monitor.png`.
2. 编辑 `main.py` 脚本文件, 修改脚本内 `exp_image_dict` 变量, 将各区块对应的 R 通道颜色值改为刚P的图的对应区块颜色值(一般不用改默认就行)
3. 编辑 `main.py` 脚本文件, 修改脚本内 `COM_PORT`, `COM_BAUDRATE`, `MAX_SLOT` 个配置
3. 编辑 `main.py` 脚本文件, 修改脚本内 `IMAGE_PATH` `COM_PORT`, `COM_BAUDRATE`, `MAX_SLOT` 个配置
4. 下一个 `VSPD` 虚拟串口工具, 将 `COM3``COM33` 建立转发
5. 电脑安装 ADB 调试工具, 安装路径添加到系统环境变量里面
6. 手机打开 USB 调试, 强烈建议同时使用 USB 网络共享连接电脑, 串流走 WLAN 可能不是很稳定

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

View File

@ -6,6 +6,8 @@ import threading
import queue
import serial
# 编辑好的图片路径
IMAGE_PATH = "./image/image_monitor.png"
# 串口号
COM_PORT = "COM33"
# 比特率
@ -262,7 +264,7 @@ def getevent():
print(event_error_output)
exp_image = Image.open("./image_monitor.png")
exp_image = Image.open(IMAGE_PATH)
exp_image_width, exp_image_height = exp_image.size
if __name__ == "__main__":

View File

@ -1,15 +0,0 @@
import time
def microsecond_sleep(sleep_time):
end_time = time.perf_counter() + (sleep_time - 1.0) / 1e6 # 1.0是时间补偿需要根据自己PC的性能去实测
while time.perf_counter() < end_time:
pass
start = time.perf_counter()
microsecond_sleep(10) # 等待10微秒
end = time.perf_counter()
print(start)
print(end)
print("等待时间:", (end-start) * 1e6, "微秒")