From 4e7eae444566b943459200232bda5e52e482cb08 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:47:05 +0900 Subject: add support for double-external-trigger mode in KMPF --- menus.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'menus.c') diff --git a/menus.c b/menus.c index 334315f..e54db7b 100644 --- a/menus.c +++ b/menus.c @@ -143,6 +143,7 @@ #define mode_ampl_fixed_point8 8800 #define mode_ampl_fixed_point9 8900 +#define mode_freq_ext2 9000 #define Submenu_maximum_entries 10 @@ -364,6 +365,8 @@ void Show_Main_Menu(void) show_item=Show_frequency+chan; } else if (globals.ChannelState[chan].trigger_source==source_external) { menu_string = g_string_append (menu_string, "EXT TRIG"); + } else if (globals.ChannelState[chan].trigger_source==source_external2) { + menu_string = g_string_append (menu_string, "EXT2 TRIG"); } else if (globals.ChannelState[chan].trigger_source==source_manual) { menu_string = g_string_append (menu_string, "MAN TRIG"); } else if (globals.ChannelState[chan].trigger_source==source_hold) { @@ -1250,6 +1253,13 @@ static void Submenu_Display(int change_selection) if (globals.Flash.is_func_gen[channel]) { Submenu_max_entry=0; + } else if (globals.Flash.ext2_enabled[channel]) { + Submenu_max_entry=4; + Submenu_Structure[0]=mode_freq_int; + Submenu_Structure[1]=mode_freq_ext; + Submenu_Structure[2]=mode_freq_ext2; + Submenu_Structure[3]=mode_freq_man; + Submenu_Structure[4]=mode_freq_hold; } else { Submenu_max_entry=3; Submenu_Structure[0]=mode_freq_int; @@ -1632,6 +1642,12 @@ static void Submenu_Display(int change_selection) current_operating_mode=i; } break; + case mode_freq_ext2: + mode_name = g_strdup("External2"); + if (globals.ChannelState[channel].trigger_source==source_external2) { + current_operating_mode=i; + } + break; case mode_freq_man: mode_name = g_strdup("Manual"); if (globals.ChannelState[channel].trigger_source==source_manual) { @@ -2969,6 +2985,11 @@ static int Submenu_Implement_Changes(void) return error_num; } break; + case mode_freq_ext2: + if (error_num=Set_Trig_Source(channel,source_external2)) { + return error_num; + } + break; case mode_freq_man: if (error_num=Set_Trig_Source(channel,source_manual)) { return error_num; -- cgit