diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:16:23 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:16:23 +0900 |
commit | 14b2520625648c1a4f6b855eafc0d94c83c49203 (patch) | |
tree | f2c84f539834f977714c95dfd74ba109329b88d0 | |
parent | 5ff42898f157d31baa91bf42922df87c4ca889ec (diff) |
ampl_zero_equiv can be large in some AVRQ units, use smallest_allowed_number for comparisons instead
-rw-r--r-- | menus.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1921,21 +1921,21 @@ static void Submenu_Display(int change_selection) case (mode_ampl_fixed_point0): use_ampl = globals.Flash.fixed_ampl_points[channel][0]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point1): use_ampl = globals.Flash.fixed_ampl_points[channel][1]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point2): use_ampl = globals.Flash.fixed_ampl_points[channel][2]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; @@ -1943,7 +1943,7 @@ static void Submenu_Display(int change_selection) case (mode_ampl_fixed_point3): use_ampl = globals.Flash.fixed_ampl_points[channel][3]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; @@ -1951,42 +1951,42 @@ static void Submenu_Display(int change_selection) case (mode_ampl_fixed_point4): use_ampl = globals.Flash.fixed_ampl_points[channel][4]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point5): use_ampl = globals.Flash.fixed_ampl_points[channel][5]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point6): use_ampl = globals.Flash.fixed_ampl_points[channel][6]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point7): use_ampl = globals.Flash.fixed_ampl_points[channel][7]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point8): use_ampl = globals.Flash.fixed_ampl_points[channel][8]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; case (mode_ampl_fixed_point9): use_ampl = globals.Flash.fixed_ampl_points[channel][9]; String_Parameter_To_Text(use_ampl,3,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); - if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<globals.Flash.ampl_zero_equiv[channel]) { + if (fabs(globals.ChannelState[channel].amplitude-use_ampl)<smallest_allowed_number) { current_operating_mode=i; } break; |