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 <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-09-24 06:46:43 +08:00
parent 15a647d8b4
commit 3a09db55ee
2 changed files with 8 additions and 5 deletions

View File

@ -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 */

View File

@ -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:再发主音量 + 调音台(保持关机前设置)。