1 Commits
Author SHA1 Message Date
Kaj SchittecatandClaude Opus 5.5 c627bec464 test: #730 vibration, the notify decision and the AW86224 driver
newMsgImpl's chime/vibration decision moves into src/ui-touch/NotifyAlert.h
(same rules, a static_assert ties its slots to the prefs' TOUCH_SND_* and
TOUCH_CHMUTE_*); the P4's vibrate task takes its beat count from it.
test/test_notify_alert.cpp: Do Not Disturb silences both for every
event, the master Sound switch only the chime, Vibrate off only the buzz;
the per-event switches and channel mutes gate the buzz as they gate the
chime; a DM with its switch off does not fall back to the message slot; a
muted mention is a plain message; 1, 2 and 3 beats for message, DM and
mention.

test/test_p4_haptic.cpp runs the production P4Haptic.cpp against a
register model of the AW86224 on a fake Wire1 (test/p4_haptic_fakes),
each case in its own process: first use loads the 711-byte waveform at
0x0800 and verifies it, the FIFO thresholds match the vendor formula, a
retained SRAM is not rewritten and one differing byte reloads it; a buzz
plays waveform 1 looped with auto brake at the given gain for exactly its
duration and is stopped; 0 or negative durations touch nothing; an absent
chip stays off the bus after the first probe; a busy bus skips the buzz;
a chip that never idles does not hang; every transaction happens with the
I2C_2 bus held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:02:25 +01:00