feat(DLPilot): 关于按钮 + 外观默认 System + 校准图案行压缩
This commit is contained in:
+6
-4
@@ -46,7 +46,8 @@ DLPilot/
|
||||
|
||||
## 3. GUI 使用
|
||||
|
||||
主窗口为双栏仪表盘(布局设计稿:`UI参考布局.svg`),默认深色外观,顶栏可切换 Dark/Light/System:
|
||||
主窗口为双栏仪表盘(布局设计稿:`UI参考布局.svg`),默认跟随系统深/浅色外观
|
||||
(顶栏可切换 Dark/Light/System),顶栏右侧"关于"按钮内含软件信息:
|
||||
|
||||
```
|
||||
左列(HDMI 源端) 右列(光机控制 RS485)
|
||||
@@ -61,12 +62,13 @@ DLPilot/
|
||||
2. **切分辨率**:"支持的模式"卡片里选模式 → "应用";测完点"恢复";
|
||||
3. **投测试图**:"测试图案"卡片先选**测试卡区域**(640x360 / 800x600 / full)→
|
||||
点图案按钮全屏投放,按 **ESC** 或点击退出;R/G/B 纯色按钮(55/AA/FF,按通道着色)
|
||||
用于 RGB 位交换类测试;自定义图片点齿轮按钮配置(图片自动复制到 exe 旁);
|
||||
用于 RGB 位交换类测试;自定义图片点齿轮按钮配置(图片自动复制到 exe 旁),
|
||||
"校准图案"一排为 3D 光固化测试/校准图预留槽位;
|
||||
4. **光机控制**:右列选串口与参数(波特率/数据位/校验/停止位,默认 115200 8-N-1)→ 连接 →
|
||||
快捷按钮/预设下拉/自定义输入(回车即发);"查DMD温度""查LAMP温度"读温度
|
||||
(应答实时填入按钮旁的显示框);快捷滑条:光强拖动后"下发 M731S",
|
||||
(应答实时填入按钮旁的显示框);快捷滑条:光强拖动后"下发电流值",
|
||||
定时毫秒后"开光机(定时)"(0=不限时 M730S0),TEC 凝露点滑条/输入框
|
||||
(200-350 即 20.0-35.0°C)后"下发 M8S";数值框输入后回车自动限幅同步;
|
||||
(200-350 即 20.0-35.0°C)后"下发温度值";数值框输入后回车自动限幅同步;
|
||||
5. 测试卡区域、自定义栏位与串口记忆(含参数)自动保存在 exe 旁的 `pattern_slots.json`。
|
||||
|
||||
## 4. 典型测试场景
|
||||
|
||||
Binary file not shown.
@@ -33,6 +33,10 @@ MONO = ('Consolas', 12)
|
||||
BOLD = ('Microsoft YaHei UI', 13, 'bold')
|
||||
TITLE_FONT = ('Microsoft YaHei UI', 18, 'bold')
|
||||
|
||||
APP_NAME = 'DLPilot'
|
||||
APP_VERSION = '0.3.0'
|
||||
REPO_URL = 'https://gitea.hulk.wang/hulk/LT8619C_Debug_Tools'
|
||||
|
||||
|
||||
def get_icon_path():
|
||||
"""工具图标: 源码模式取 logos/ 下, 打包模式取 exe 内嵌资源(_MEIPASS)"""
|
||||
@@ -56,7 +60,7 @@ def _apply_dropdown_theme():
|
||||
|
||||
def run_gui(auto_close=0):
|
||||
"""入口: 配置外观并启动主窗口"""
|
||||
ctk.set_appearance_mode('Dark')
|
||||
ctk.set_appearance_mode('System')
|
||||
_apply_dropdown_theme()
|
||||
App(auto_close).mainloop()
|
||||
|
||||
@@ -134,8 +138,13 @@ class App(ctk.CTk):
|
||||
text_color='gray60').pack(side='left', padx=10, pady=(6, 0))
|
||||
seg = ctk.CTkSegmentedButton(top, values=['Dark', 'Light', 'System'],
|
||||
command=self._set_appearance)
|
||||
seg.set('Dark')
|
||||
seg.set('System')
|
||||
seg.pack(side='right')
|
||||
ctk.CTkButton(top, text='关于', width=48, height=24,
|
||||
fg_color='transparent', border_width=1,
|
||||
border_color=('gray55', 'gray35'),
|
||||
text_color='gray60', hover_color=('gray82', 'gray22'),
|
||||
command=self._show_about).pack(side='right', padx=(0, 12))
|
||||
|
||||
body = ctk.CTkFrame(self, fg_color='transparent')
|
||||
body.pack(fill='both', expand=True, padx=12, pady=(4, 12))
|
||||
@@ -245,16 +254,16 @@ class App(ctk.CTk):
|
||||
row4.pack(fill='x', pady=(6, 0))
|
||||
for i in range(3, config.SLOT_COUNT):
|
||||
cell = ctk.CTkFrame(row4, fg_color='transparent')
|
||||
cell.pack(side='left', padx=(0, 10))
|
||||
btn = ctk.CTkButton(cell, text=self.slots[i]['name'], width=96,
|
||||
cell.pack(side='left', padx=(0, 6))
|
||||
btn = ctk.CTkButton(cell, text=self.slots[i]['name'], width=84,
|
||||
command=lambda i=i: self._show_custom(i))
|
||||
btn.pack(side='left')
|
||||
ctk.CTkButton(cell, text='\uE713', width=30, height=24,
|
||||
ctk.CTkButton(cell, text='\uE713', width=26, height=24,
|
||||
font=('Segoe MDL2 Assets', 13),
|
||||
command=lambda i=i: self._configure_slot(i)
|
||||
).pack(side='left', padx=(4, 0))
|
||||
).pack(side='left', padx=(3, 0))
|
||||
self.slot_buttons.append(btn)
|
||||
ctk.CTkLabel(row4, text='校准图案(预留 5 槽, 齿轮改图)',
|
||||
ctk.CTkLabel(row4, text='校准图案(齿轮改图)',
|
||||
text_color='gray50').pack(side='left', padx=4)
|
||||
|
||||
# -- EDID 原始数据 --
|
||||
@@ -623,6 +632,26 @@ class App(ctk.CTk):
|
||||
ctk.CTkButton(btns, text='取消', width=70, fg_color='gray40',
|
||||
hover_color='gray25', command=dlg.destroy).pack(side='left')
|
||||
|
||||
def _show_about(self):
|
||||
dlg = ctk.CTkToplevel(self)
|
||||
dlg.title(f'关于 {APP_NAME}')
|
||||
dlg.resizable(False, False)
|
||||
dlg.after(150, dlg.grab_set())
|
||||
box = ctk.CTkFrame(dlg, fg_color='transparent')
|
||||
box.pack(padx=26, pady=20)
|
||||
ctk.CTkLabel(box, text=APP_NAME, font=TITLE_FONT, anchor='w').pack(anchor='w')
|
||||
ctk.CTkLabel(box, text=f'v{APP_VERSION} — 3D 光固化光机调试台',
|
||||
text_color='gray60', anchor='w').pack(anchor='w', pady=(0, 12))
|
||||
for line in ('EDID 查看 / 逐字节解析 / 分辨率切换',
|
||||
'测试图案与校准图全屏投屏',
|
||||
'RS485 光机控制: 开关光机 / 光强 / 定时 / 温度 / TEC',
|
||||
'配套硬件: LT8619C → DLPC3421 转接板 (GD32E230 网关)'):
|
||||
ctk.CTkLabel(box, text='· ' + line, anchor='w').pack(anchor='w', pady=1)
|
||||
ctk.CTkLabel(box, text='仓库: ' + REPO_URL, anchor='w',
|
||||
text_color='#3B8ED0').pack(anchor='w', pady=(12, 0))
|
||||
ctk.CTkButton(box, text='关闭', width=84,
|
||||
command=dlg.destroy).pack(anchor='e', pady=(14, 0))
|
||||
|
||||
def _show_edid_fields(self):
|
||||
d = self._cur_display()
|
||||
if d is None:
|
||||
|
||||
Reference in New Issue
Block a user