altosui: Set the beeper to 0 to disable
authorKeith Packard <keithp@keithp.com>
Wed, 3 Jan 2024 20:24:08 +0000 (12:24 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 19 Apr 2024 21:18:50 +0000 (14:18 -0700)
Don't force the beeper to the default value when the frequency is set to 0.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosConvert.java
altosui/AltosConfigFCUI.java

index ded4b36527cbfc92e6ba7beefbadcc9a31a3cbb1..84f7e23d91a7f03ea44d3c3139fd7a61a78d7aa3 100644 (file)
@@ -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);
        }
 
index bc082a4ee6fbda228ccf58de5fc124e3f5ba5f66..a238c7df0827ad5d1ce69d82f86c02bfd3db0606 100644 (file)
@@ -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");
        }