Commit Graph

7 Commits

Author SHA1 Message Date
edisondeng
2a83079007 refactor(event): replace global 60s inactivity timer with per-second tick event
Adds KEY_EVENT_SECOND_TICK, generated once per real second from
Clock_IncMS() via a new second_tick_flag and pushed through the normal
event queue, so every foreground App's onEvent() receives it and
decides independently whether to act. Removes the old global
inactivity_timer (60s sleep from anywhere) entirely. HomeApp now
accumulates its own idle-second counter and sleeps after 10s idle
specifically while on the home screen; MenuApp's existing 10s
auto-close is converted from onRun() polling to the same tick+reset
pattern for consistency. Any non-tick key event resets each app's own
counter to 0.
2026-07-31 18:49:03 +08:00
edisondeng
ae235d3c51 feat(menu): auto-close main menu after 10s idle
menu_app now tracks the last key-activity timestamp (via current_sec,
same wraparound-safe pattern already used in pair_app) and switches
back to home_app if no key event arrives for 10 seconds, using the
AppManager's existing per-frame onRun() callback as the check point.
2026-07-31 18:11:55 +08:00
edisondeng
56b92a8ede refactor(app): App-per-screen navigation, remove menu_level entirely
Splits the ad-hoc menu_level state machine into standalone Apps with a
uniform parent/child exit convention (long-press CONFIRM -> parent):
clock_app renamed to home_app (boot-default), new set_clock_app
extracted from home_app's time-edit mode, new ipc_bind_app extracted
from menu_app's old level-2 screen, and the sensor-type selection step
merged into pair_app as its new initial state. menu_app now only holds
the 4-item top-level list (language toggle inline). Also makes both
menu_app and pair_app's up/down navigation cyclic (wraps at both ends).
2026-07-31 18:05:23 +08:00
edisondeng
a7a2cc9465 暂存 2026-07-31 13:57:06 +08:00
Antigravity IDE
7cbd83c40b 修复 App 语法报错与命名冲突,彻底在后台命令行成功编译生成 wristband.hex 固件 2026-07-17 09:41:29 +08:00
Antigravity IDE
32e48f0576 修复 menu_items 未定义错误,并清除旧 uvopt 强制 Keil 重新生成配置 2026-07-17 09:32:44 +08:00
Antigravity IDE
c0d1fe74f5 重构手环软件架构:实现动态挂载前后台 App 框架,解耦拆分源文件,并引入统一日志宏 xtell.h 2026-07-17 09:08:53 +08:00