diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:32:25 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:32:25 +0900 |
commit | 13a830f20ffaa8db11a7a3ff8299b916d729d43f (patch) | |
tree | dc78529527f375bcc367de709936cb1990b8d457 /menus.c | |
parent | 6c92f7f600f5cf65af14e1ff4ef8250197947d4a (diff) |
first attempt at adding min/max-only rise time, for -KTA-TRA
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 43 |
1 files changed, 40 insertions, 3 deletions
@@ -147,6 +147,9 @@ #define mode_route1 9100 #define mode_route2 9200 +#define mode_rise_time_min 9300 +#define mode_rise_time_max 9400 + #define Submenu_maximum_entries 10 /* what parameter to adjust */ @@ -1386,9 +1389,16 @@ static void Submenu_Display(int change_selection) break; case Submenu1_rise_time: - title = title_with_channel("Rise time (10%-90%)",globals.Flash.ChanKey_rise_time,channel); - Submenu_Numeric_Parameter=Show_rise_time+channel; - Submenu_max_entry=0; + title = title_with_channel("Rise time",globals.Flash.ChanKey_rise_time,channel); + + if (globals.Flash.rise_time_min_max_only[channel]) { + Submenu_max_entry=1; + Submenu_Structure[0]=mode_rise_time_min; + Submenu_Structure[1]=mode_rise_time_max; + } else { + Submenu_Numeric_Parameter=Show_rise_time+channel; + Submenu_max_entry=0; + } break; case Submenu1_slew: @@ -2051,6 +2061,21 @@ static void Submenu_Display(int change_selection) current_operating_mode=i; } break; + + case mode_rise_time_min: + String_Parameter_To_Text(globals.Flash.min_rise_time[channel],2,"","s",&mode_name,NO,LCD_col_width); + if (fabs(globals.ChannelState[channel].rise_time-globals.Flash.min_rise_time[channel]) < smallest_allowed_number) { + current_operating_mode=i; + } + break; + + case mode_rise_time_max: + String_Parameter_To_Text(globals.Flash.max_rise_time[channel],2,"","s",&mode_name,NO,LCD_col_width); + if (fabs(globals.ChannelState[channel].rise_time-globals.Flash.max_rise_time[channel]) < smallest_allowed_number) { + current_operating_mode=i; + } + break; + default: mode_name = g_strdup("??"); break; @@ -3172,6 +3197,18 @@ static int Submenu_Implement_Changes(void) } break; + case mode_rise_time_min: + if (error_num=Set_rise_time(0,0,0,channel,globals.Flash.min_rise_time[channel])) { + return error_num; + } + break; + + case mode_rise_time_max: + if (error_num=Set_rise_time(0,0,0,channel,globals.Flash.max_rise_time[channel])) { + return error_num; + } + break; + // hard-coded count of 10 - not ideal! case (mode_ampl_fixed_point0): if (error_num=Set_Amplitude(0,0,0,0,0,0,channel,globals.Flash.fixed_ampl_points[channel][0],0)) { |