fix(locator): hide homing beeper in leave-only mode

The proximity beeper only fires inside the radius and ticks faster toward
the centre — a homing aid that only makes sense when "arrive" is part of the
alert mode. In pure "leave" mode it's contradictory (silent outside, slows
as you near the exit), so hide the Beeper row there and gate the beeper
engine on the mode, so a stale beeper=ON pref carried over from arrive mode
can't keep chirping after switching to leave.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MarekZegare4
2026-06-24 23:50:16 +02:00
co-authored by Claude Opus 4.8
parent 94a97967ae
commit 49f790bf76
2 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -2391,7 +2391,7 @@ void UITask::locatorProximityBeeper() {
static const uint32_t BEEP_MIN_MS = 150; // fastest cadence (at the target)
static const uint32_t BEEP_MAX_MS = 2000; // slowest cadence (at the edge)
if (!_node_prefs || !_node_prefs->locator_enabled || !_node_prefs->locator_beeper
|| !_node_prefs->locator_has_target) {
|| !_node_prefs->locator_has_target || _node_prefs->locator_mode == 1) { // leave-only mode: no homing
return;
}
if ((int32_t)(millis() - _locator_beep_check_ms) < 0) return;