feat(led): match prototype boot light show Blue-Cyan-Red-Cyan

On POWER_ON, fret-side LEDs follow the sample-unit '开机彩灯' sequence instead of jumping straight to solid green.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-09-24 06:39:00 +08:00
parent 3c102a918f
commit 15a647d8b4
1 changed files with 17 additions and 12 deletions

View File

@ -2,18 +2,24 @@
uint8_t CurrentMode = 0; uint8_t CurrentMode = 0;
void RGB_Y_TO_R() /* 样机「开机彩灯」:侧灯全亮色序 蓝→青→红→青(末态保持青) */
void UI_BootLedShow(void)
{ {
app_tm1629_all_on(LED_COLOR_YELL); static const LedColor_TypeDef seq[] = {
rt_thread_delay(1000); LED_COLOR_B,
app_tm1629_all_on(LED_COLOR_R); 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() for (i = 0; i < (uint8_t)(sizeof(seq) / sizeof(seq[0])); i++)
{ {
app_tm1629_all_on(LED_COLOR_YELL); app_tm1629_all_on(seq[i]);
rt_thread_delay(1000); if (hold_ms[i] != 0U)
app_tm1629_all_on(LED_COLOR_G); rt_thread_mdelay(hold_ms[i]);
}
} }
#define UI_MODE_SCREEN_WIDTH 240 #define UI_MODE_SCREEN_WIDTH 240
@ -181,8 +187,7 @@ void IdleProcess(DisplayTaskMessage_Type msg)
* 待 StartScanTask 后由 MasterVolume_Reapply 统一补发 */ * 待 StartScanTask 后由 MasterVolume_Reapply 统一补发 */
UI_DrawModeSelectScreen(); UI_DrawModeSelectScreen();
TM1629D_AllLedOn(LED_COLOR_G); UI_BootLedShow();
TM1629D_UpdateDisplay(0);
StartTouchTask(); StartTouchTask();
StartScanTask(); StartScanTask();
/* Dream 上电稍后可能忽略首包 SysEx:再发主音量 + 调音台(保持关机前设置)。 /* Dream 上电稍后可能忽略首包 SysEx:再发主音量 + 调音台(保持关机前设置)。