Some PCB variants may not populate the PCF8563. Guards RTC init/read
in HomeApp_OnStart(), the WriteDateTime() save in SetClockApp, and the
I2C/RTC diagnostic scans in Self_Test() behind #if USE_PCF8563. When
disabled, the firmware runs entirely on the Timer1-driven software
clock; date/time just won't survive a power cycle without the chip.
time_edit_field now cycles through 5 fields (hour/min/day/month/year)
via long-press CONFIRM. Up/down adjusts whichever field is focused,
with day clamped to Days_In_Month() when month/year changes, and
Clock_RecalcWeekday() called after every date edit so the weekday
label stays in sync. UI_UpdateSetTimeDigit() now also refreshes the
weekday abbreviation when editing day/month/year, since the computed
weekday can change independently of which digit was actually touched.
Save writes the full date+weekday via PCF8563_WriteDateTime(). Also
removes PCF8563_ReadTime()/WriteTime(), now unused since every caller
was updated to the DateTime variants directly.
UI_ShowSetTimePage() cleared and redrew the entire screen on every
500ms blink toggle and on every up/down value change, causing a
full-screen flash instead of just the intended hour/minute digit
blinking. Split out UI_UpdateSetTimeDigit() which only repaints the
32x32px digit region for the field being edited; the full page draw
is now only used on entry. Field-switch (long-press CONFIRM) refreshes
both digit regions to clear any stale blanked-out state.
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).