From 3a09db55ee6fb1033d99f7a3b441a32aad7053e1 Mon Sep 17 00:00:00 2001 From: yuquanjun Date: Thu, 24 Sep 2026 06:46:43 +0800 Subject: [PATCH] fix(led): start boot light show with LCD logo Init TM1629 before POWER_ON and run the color sequence during the logo dwell instead of after mode select. Co-authored-by: Cursor --- Global/Global.c | 6 ++++-- UI/UI_Idle.c | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Global/Global.c b/Global/Global.c index 1862b6e..1921810 100644 --- a/Global/Global.c +++ b/Global/Global.c @@ -243,13 +243,15 @@ void System_PowerOn(void) BSP_BlueToothPowerEnable((uint8_t)(mGuiData[GUI_BL_SW].Current ? 1 : 0)); powon = true; /* 更新开机标志 */ + /* 侧灯须在 POWER_ON/Logo 前就绪,否则彩灯会晚于 Logo */ + TM1629D_Key_LED_Init(); + app_tm1617_init(); + /* 先通知 UI 亮屏,避免外设初始化阻塞导致长时间黑屏 */ LOG_I("PWR", "send POWER_ON"); MainTask_Sendmsg(MSG_ID_POWER_ON, 0, 0, 0); AD85020B_Init(); - TM1629D_Key_LED_Init(); - app_tm1617_init(); XPT2046_Init(); App_Auto_Init(); /* App 协议走 UART4:须在开机后即解析,不能等到触摸选模式才 StartTask */ diff --git a/UI/UI_Idle.c b/UI/UI_Idle.c index cc2bf93..20ea2f6 100644 --- a/UI/UI_Idle.c +++ b/UI/UI_Idle.c @@ -178,16 +178,17 @@ void IdleProcess(DisplayTaskMessage_Type msg) LCD_WR_REG(0x29); /* Display ON */ s_charge_ui_drawn = false; LCD_BLK_Set(); + /* 刷 Logo 前先点蓝,避免 Flash 读图期间侧灯仍灭 */ + app_tm1629_all_on(LED_COLOR_B); LCD_WR_PIC_FROM_FLASH(0, 0, UI0902_BOOT_LOGO_W, UI0902_BOOT_LOGO_H, UI0902_BOOT_LOGO_ADDR); - /* 让出 CPU,避免忙等卡住触摸/主循环线程 */ - rt_thread_mdelay(1000); + /* 与 Logo 同期跑完蓝→青→红→青(约 1.1s),替代原先空等 1s */ + UI_BootLedShow(); LoadConfig(); /* 主音量不在此现场切通道读 ADC(会与扫描任务串通道): * 待 StartScanTask 后由 MasterVolume_Reapply 统一补发 */ UI_DrawModeSelectScreen(); - UI_BootLedShow(); StartTouchTask(); StartScanTask(); /* Dream 上电稍后可能忽略首包 SysEx:再发主音量 + 调音台(保持关机前设置)。