snapshot
This commit is contained in:
@@ -67,18 +67,21 @@ void loop() {
|
||||
// ---- Touch handling varies by screen ----
|
||||
|
||||
if (state.screen == ScreenID::ALERT) {
|
||||
// Hold-and-release to silence
|
||||
// Hold-and-release to silence
|
||||
HoldState hold = display.updateHold(HOLD_TO_SILENCE_MS);
|
||||
|
||||
if (hold.completed) {
|
||||
// Finger lifted after full charge → silence now
|
||||
// Small delay so user sees the clean transition
|
||||
delay(80);
|
||||
logic.onTouch(TouchEvent{true, hold.x, hold.y});
|
||||
// Finger lifted after full charge → silence now
|
||||
display.stopHint();
|
||||
delay(80);
|
||||
silenceAlerts();
|
||||
} else if (hold.active || hold.charged) {
|
||||
// Real interaction in progress — suppress hint
|
||||
display.stopHint();
|
||||
} else {
|
||||
// No touch — run coaching hint
|
||||
display.updateHint();
|
||||
}
|
||||
// charged/filling states are rendered by drawSilenceProgress()
|
||||
// cancelled = finger lifted early, no action needed
|
||||
|
||||
} else if (state.screen == ScreenID::DASHBOARD) {
|
||||
TouchEvent evt = display.readTouch();
|
||||
if (evt.pressed) {
|
||||
@@ -119,5 +122,6 @@ void loop() {
|
||||
cmd.trim();
|
||||
if (cmd.length() > 0) logic.onSerialCommand(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user