feat(ui): show real weekday/day/month on HOME screen instead of placeholder
UI_ShowClockPage()/UI_ShowSetTimePage() now take weekday/day/month(/year) and build the date bar dynamically via Build_DateString() instead of the fixed placeholder string. app_home.c reads the full date from RTC via PCF8563_ReadDateTime() and recalculates weekday since the RTC's stored date may differ from the software clock's. config.h exposes current_day/month/year/weekday alongside the existing time fields so main.c's debug commands don't need a separate include.
This commit is contained in:
@@ -186,21 +186,21 @@ void Debug_ProcessCommand(char cmd)
|
||||
// 模拟切换至 正常撤防 (NORMAL) 状态并刷新时钟
|
||||
if (AppManager_GetActiveAppID() == APP_ID_HOME) {
|
||||
current_state = STATE_NORMAL;
|
||||
UI_ShowClockPage(current_state, current_hour, current_min);
|
||||
UI_ShowClockPage(current_state, current_hour, current_min, current_weekday, current_day, current_month);
|
||||
}
|
||||
Uart_SendString("[UART] State: NORMAL\r\n");
|
||||
} else if (cmd == '2') {
|
||||
// 模拟切换至 已布防 (ARMED) 状态,普通门磁可触发警报
|
||||
if (AppManager_GetActiveAppID() == APP_ID_HOME) {
|
||||
current_state = STATE_ARMED;
|
||||
UI_ShowClockPage(current_state, current_hour, current_min);
|
||||
UI_ShowClockPage(current_state, current_hour, current_min, current_weekday, current_day, current_month);
|
||||
}
|
||||
Uart_SendString("[UART] State: ARMED\r\n");
|
||||
} else if (cmd == '3') {
|
||||
// 模拟切换至 已撤防 (DISARMED) 状态,忽略普通报警
|
||||
if (AppManager_GetActiveAppID() == APP_ID_HOME) {
|
||||
current_state = STATE_DISARMED;
|
||||
UI_ShowClockPage(current_state, current_hour, current_min);
|
||||
UI_ShowClockPage(current_state, current_hour, current_min, current_weekday, current_day, current_month);
|
||||
}
|
||||
Uart_SendString("[UART] State: DISARMED\r\n");
|
||||
} else if (cmd == 'z' || cmd == 'Z') {
|
||||
|
||||
Reference in New Issue
Block a user