From 15a647d8b40112eba3a1f706d071070ea8e21fbc Mon Sep 17 00:00:00 2001 From: yuquanjun Date: Thu, 24 Sep 2026 06:39:00 +0800 Subject: [PATCH] feat(led): match prototype boot light show Blue-Cyan-Red-Cyan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On POWER_ON, fret-side LEDs follow the sample-unit '开机彩灯' sequence instead of jumping straight to solid green. Co-authored-by: Cursor --- UI/UI_Idle.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/UI/UI_Idle.c b/UI/UI_Idle.c index 70ea6ee..cc2bf93 100644 --- a/UI/UI_Idle.c +++ b/UI/UI_Idle.c @@ -2,18 +2,24 @@ uint8_t CurrentMode = 0; -void RGB_Y_TO_R() +/* 样机「开机彩灯」:侧灯全亮色序 蓝→青→红→青(末态保持青) */ +void UI_BootLedShow(void) { - app_tm1629_all_on(LED_COLOR_YELL); - rt_thread_delay(1000); - app_tm1629_all_on(LED_COLOR_R); -} + static const LedColor_TypeDef seq[] = { + LED_COLOR_B, + LED_COLOR_CYA, + LED_COLOR_R, + LED_COLOR_CYA, + }; + static const uint16_t hold_ms[] = { 400, 300, 400, 0 }; + uint8_t i; -void RGB_Y_TO_G() -{ - app_tm1629_all_on(LED_COLOR_YELL); - rt_thread_delay(1000); - app_tm1629_all_on(LED_COLOR_G); + for (i = 0; i < (uint8_t)(sizeof(seq) / sizeof(seq[0])); i++) + { + app_tm1629_all_on(seq[i]); + if (hold_ms[i] != 0U) + rt_thread_mdelay(hold_ms[i]); + } } #define UI_MODE_SCREEN_WIDTH 240 @@ -181,8 +187,7 @@ void IdleProcess(DisplayTaskMessage_Type msg) * 待 StartScanTask 后由 MasterVolume_Reapply 统一补发 */ UI_DrawModeSelectScreen(); - TM1629D_AllLedOn(LED_COLOR_G); - TM1629D_UpdateDisplay(0); + UI_BootLedShow(); StartTouchTask(); StartScanTask(); /* Dream 上电稍后可能忽略首包 SysEx:再发主音量 + 调音台(保持关机前设置)。