diff options
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -2171,7 +2171,6 @@ static int Submenu_Mult_Value(float mult_by) channel=Submenu_Numeric_Parameter%100; if (fabs(Submenu_Value) < smallest_allowed_number) { - printf ("small\n"); if (Submenu_Value < 0.0) { new_value = -smallest_allowed_number * mult_by; } else { @@ -2231,15 +2230,15 @@ static int Submenu_Mult_Value(float mult_by) break; case Show_amplitude: - if (fabs(new_value)<globals.Flash.ampl_zero_equiv[channel] && mult_by>1.0) { - if (new_value<0.0 || globals.Flash.max_ampl[channel]<globals.Flash.ampl_zero_equiv[channel]) { - new_value=-globals.Flash.ampl_zero_equiv[channel]; + if (fabs(new_value)<get_ampl_zero_equiv(channel) && mult_by>1.0) { + if (new_value<0.0 || globals.Flash.max_ampl[channel]<get_ampl_zero_equiv(channel)) { + new_value=-get_ampl_zero_equiv(channel); } else { - new_value=globals.Flash.ampl_zero_equiv[channel]; + new_value=get_ampl_zero_equiv(channel); } } - if (fabs(new_value) < globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(new_value) < get_ampl_zero_equiv(channel)) { if (new_value<0.0) { new_value=-smallest_allowed_number; } else { @@ -2501,9 +2500,9 @@ static void Submenu_Service_Encoder(int encoder_change) encoder_change = -encoder_change; } - else if ((channel<max_channels) && abs_Submenu_Value<globals.Flash.ampl_zero_equiv[channel] && (Submenu_Numeric_Parameter-channel)==Show_amplitude) { - abs_Submenu_Value=globals.Flash.ampl_zero_equiv[channel]; - if (globals.Flash.max_ampl[channel]<globals.Flash.ampl_zero_equiv[channel]) { + else if ((channel<max_channels) && abs_Submenu_Value<get_ampl_zero_equiv(channel) && (Submenu_Numeric_Parameter-channel)==Show_amplitude) { + abs_Submenu_Value=get_ampl_zero_equiv(channel); + if (globals.Flash.max_ampl[channel]<get_ampl_zero_equiv(channel)) { Submenu_Value=-abs_Submenu_Value; } } @@ -2695,7 +2694,7 @@ static void Submenu_Service_Encoder(int encoder_change) return; } - if (fabs(new_value) < globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(new_value) < get_ampl_zero_equiv(channel)) { if (Submenu_Value<0.0) { new_value=-smallest_allowed_number; } else { |