From a1a298c37ad0a762b651ad349d86ad32eb902904 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 11:26:38 +0900 Subject: fixed submenu mode numbering --- menus.c | 55 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'menus.c') diff --git a/menus.c b/menus.c index b990dbd..85f53a5 100644 --- a/menus.c +++ b/menus.c @@ -131,7 +131,18 @@ #define mode_57600 7700 #define mode_115200 7800 #define mode_pw_ew 7900 -#define mode_ampl_fixed_points 8000 + +#define mode_ampl_fixed_point0 8000 +#define mode_ampl_fixed_point1 8100 +#define mode_ampl_fixed_point2 8200 +#define mode_ampl_fixed_point3 8300 +#define mode_ampl_fixed_point4 8400 +#define mode_ampl_fixed_point5 8500 +#define mode_ampl_fixed_point6 8600 +#define mode_ampl_fixed_point7 8700 +#define mode_ampl_fixed_point8 8800 +#define mode_ampl_fixed_point9 8900 + #define Submenu_maximum_entries 10 @@ -1354,7 +1365,7 @@ static void Submenu_Display(int change_selection) int fixed_count; Submenu_max_entry = number_of_fixed_ampl_points(channel) - 1; for (fixed_count = 0; fixed_count < number_of_fixed_ampl_points(channel); ++fixed_count) { - Submenu_Structure[fixed_count] = mode_ampl_fixed_points + fixed_count; + Submenu_Structure[fixed_count] = mode_ampl_fixed_point0 + (fixed_count*100); } } else if (globals.ChannelState[channel].amp_mode==amp_mode_normal) { Submenu_Numeric_Parameter=Show_amplitude+channel; @@ -1906,21 +1917,21 @@ static void Submenu_Display(int change_selection) // hard-coded count of 10 - not ideal! - case mode_ampl_fixed_points + 0: + case (mode_ampl_fixed_point0): use_ampl = globals.Flash.fixed_ampl_points[channel][0]; String_Parameter_To_Text(use_ampl,2,"",fixed_ampl_units,&mode_name,YES,LCD_col_width); if (fabs(globals.ChannelState[channel].amplitude-use_ampl)