summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:53:59 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:53:59 +0900
commit82db18314efe170471f1675d40fbf1416fbb95e8 (patch)
treefa6c44d7281ed08f3745d548bde2bf3a68b9719c /menus.c
parentdfed10ba9ceb7380948ce2d966fac5f267097e5f (diff)
+/- button not working as expected first press after turn-on, fixed. Better debugging messages.
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/menus.c b/menus.c
index 840211e..a92d471 100644
--- a/menus.c
+++ b/menus.c
@@ -2168,7 +2168,18 @@ static int Submenu_Mult_Value(float mult_by)
channel=Submenu_Numeric_Parameter%100;
- new_value = Submenu_Value * mult_by;
+ if (fabs(Submenu_Value) < smallest_allowed_number) {
+ printf ("small\n");
+ if (Submenu_Value < 0.0) {
+ new_value = -smallest_allowed_number * mult_by;
+ } else {
+ new_value = smallest_allowed_number * mult_by;
+ }
+ } else {
+ new_value = Submenu_Value * mult_by;
+ }
+
+ g_print_debug("chan %d, Submenu_Value %e, mult_by %e, new_value %e\n", channel, Submenu_Value, mult_by, new_value);
switch (Submenu_Numeric_Parameter-channel) {
case Show_frequency: