From 5c815c673fa7e82419299d87ffde939fbd842333 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 3 Jan 2024 12:24:08 -0800 Subject: [PATCH] altosui: Set the beeper to 0 to disable Don't force the beeper to the default value when the frequency is set to 0. Signed-off-by: Keith Packard --- altoslib/AltosConvert.java | 2 +- altosui/AltosConfigFCUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/altoslib/AltosConvert.java b/altoslib/AltosConvert.java index ded4b365..84f7e23d 100644 --- a/altoslib/AltosConvert.java +++ b/altoslib/AltosConvert.java @@ -559,7 +559,7 @@ public class AltosConvert { public static int beep_freq_to_value(double freq) { if (freq == 0) - return 94; + return 0; return (int) Math.floor (1.0/2.0 * (24.0e6/32.0) / freq + 0.5); } diff --git a/altosui/AltosConfigFCUI.java b/altosui/AltosConfigFCUI.java index bc082a4e..a238c7df 100644 --- a/altosui/AltosConfigFCUI.java +++ b/altosui/AltosConfigFCUI.java @@ -353,7 +353,7 @@ public class AltosConfigFCUI void set_beep_tool_tip() { if (beep_value.isVisible()) - beep_value.setToolTipText("What frequency the beeper will sound at"); + beep_value.setToolTipText("What frequency the beeper will sound at (0 for off)"); else beep_value.setToolTipText("Older firmware could not select beeper frequency"); } -- 2.30.2