fix(ui): keep the boot logo until the light show finishes

Mode select was covering the logo before the side lights played. Firmware is 0.2.52.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yuquanjun 2026-10-10 18:37:42 +08:00
parent a8bf9a3a91
commit 9b9aaeaadf
3 changed files with 20 additions and 16 deletions

View File

@ -111,7 +111,7 @@ int16_t MIC_VOL_MAP[11]= {-9000,-7000,-5000,-3000,-1000,1000,3000,5000,7000,9000
uint8_t TOUCH_AREA_NUM = (sizeof(Touch_Areas)/sizeof(Touch_AreaTypeDef));
const uint8_t Version[3] = {0,2,51}; /* major.minor.patch — 0.2.51: 低于 6.8V 不亮开机灯、不初始化音源 */
const uint8_t Version[3] = {0,2,52}; /* major.minor.patch — 0.2.52: 开机 Logo 保持到彩灯结束再进模式选择 */
uint8_t Led = 8;
bool PressFlag = 0;

View File

@ -179,17 +179,21 @@ extern uint8_t bat_init_done;
static bool s_charge_ui_drawn = false;
static uint8_t s_boot_led_done = 0;
/* 包电压已高于 6.8V 才点侧灯并给音源板上电。电压未知或仍低电时直接返回。 */
/* Logo 保持到彩灯结束再进模式选择。电压未知或仍低于 6.8V 时留在 Logo,不点灯。 */
static void UI_BeginPerformancePower(void)
{
if (!powon || !app_adc_charge_ui_allowed())
return;
if (!s_boot_led_done)
if (!powon || !app_adc_charge_ui_allowed() || s_boot_led_done)
{
if (powon && app_adc_charge_ui_allowed())
System_RequestAudioBringUp();
return;
}
s_boot_led_done = 1;
UI_BootLedShow();
}
System_RequestAudioBringUp();
UI_DrawModeSelectScreen();
StartTouchTask();
Draw_Volume_Bar(UI0902_VOL_X, UI0902_VOL_Y, level, 1, WHITE, GRAY);
}
void IdleProcess(DisplayTaskMessage_Type msg)
{
@ -202,16 +206,12 @@ void IdleProcess(DisplayTaskMessage_Type msg)
s_charge_ui_drawn = false;
LCD_BLK_Set();
s_boot_led_done = 0;
/* 高于 6.8V 才与彩灯并行给音源板上电;否则只留屏幕,等电压起来再补 */
/* 先留 Logo。彩灯(蓝→青→红→绿,约 1.1s)播完才进模式选择 */
LCD_WR_PIC_FROM_FLASH(0, 0, UI0902_BOOT_LOGO_W, UI0902_BOOT_LOGO_H,
UI0902_BOOT_LOGO_ADDR);
UI_BeginPerformancePower();
UI_DrawModeSelectScreen();
/* 先启动触摸再返回,功放初始化改到主循环,避免 UI 堵在 I2C 里点击无响应 */
StartTouchTask();
/* 扫描先跑,才能采到包电压。电压已高于 6.8V 时这里就播彩灯并切模式页 */
StartScanTask();
Draw_Volume_Bar(UI0902_VOL_X, UI0902_VOL_Y, level, 1, WHITE, GRAY);
UI_BeginPerformancePower();
break;
case MSG_ID_HEAVY_BOOT:
@ -275,6 +275,8 @@ void IdleProcess(DisplayTaskMessage_Type msg)
break;
case MSG_ID_BATTERY_VALUE:
if (!s_boot_led_done)
break;
Draw_Status_Battery_Icon(msg.ID);
break;
@ -353,8 +355,10 @@ void IdleProcess(DisplayTaskMessage_Type msg)
case MSG_ID_EC_VOL:
{
/* 主音量已在 MainTask 下发;此处只刷新条 */
/* 主音量已在 MainTask 下发;Logo 期间不画音量条 */
level = msg.HiByte;
if (!s_boot_led_done)
break;
Draw_Volume_Bar(UI0902_VOL_X, UI0902_VOL_Y, level, 1, WHITE, GRAY);
ResetAutoPowerCount();
}

View File

@ -38,7 +38,7 @@ TONE_HDR = PROJ / "project" / "inc" / "ExtFlash_Tone_Addr.h"
IAP_DIR = REPO / "升级" / "MCU主控升级"
OUT_ROOT = REPO / "tools" / "out"
FW_VER = "0.2.51"
FW_VER = "0.2.52"
UI0902_RES_BASE = 0x00100000
BOOT_FLASH_ADDR = 0x08000000
APP_FLASH_ADDR = 0x08008000