summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--menus.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/menus.c b/menus.c
index 15dbcde..81e7104 100644
--- a/menus.c
+++ b/menus.c
@@ -132,6 +132,7 @@
#define mode_38400 7600
#define mode_57600 7700
#define mode_115200 7800
+#define mode_pw_ew 7900
#define Submenu_maximum_entries 10 /* used to be 4, before scrolling lists were added */
@@ -1312,16 +1313,25 @@ static void Submenu_Display(int change_selection)
Submenu_Structure[0]=mode_pw_norm;
if (globals.ChannelState[channel].trigger_source==source_external && (globals.Flash.pw_ab_mode_enabled[channel])) {
- Submenu_max_entry=1;
- Submenu_Structure[1]=mode_pw_inout;
- } else if (globals.ChannelState[channel].trigger_source==source_internal && (globals.Flash.dc_mode_allowed[channel])) {
- Submenu_max_entry=2;
- Submenu_Structure[1]=mode_pw_duty;
- Submenu_Structure[2]=mode_pw_dc;
- } else if (globals.ChannelState[channel].trigger_source==source_internal) {
- Submenu_max_entry=1;
- Submenu_Structure[1]=mode_pw_duty;
+ ++Submenu_max_entry;
+ Submenu_Structure[Submenu_max_entry]=mode_pw_inout;
+ }
+
+ if (globals.ChannelState[channel].trigger_source==source_internal) {
+ ++Submenu_max_entry;
+ Submenu_Structure[Submenu_max_entry]=mode_pw_duty;
+
+ if (globals.Flash.dc_mode_allowed[channel]) {
+ ++Submenu_max_entry;
+ Submenu_Structure[Submenu_max_entry]=mode_pw_dc;
+ }
+ }
+
+ if (globals.Flash.ew_enabled[channel]) {
+ ++Submenu_max_entry;
+ Submenu_Structure[Submenu_max_entry]=mode_pw_ew;
}
+
break;
case Submenu1_amp:
@@ -1711,6 +1721,12 @@ static void Submenu_Display(int change_selection)
current_operating_mode=i;
}
break;
+ case mode_pw_ew:
+ mode_name = g_strdup("Ext Control");
+ if (globals.ChannelState[channel].func_mode==pulse_mode_on && globals.ChannelState[channel].pw_ctrl_mode==pw_ew_ext) {
+ current_operating_mode=i;
+ }
+ break;
case mode_pw_dc:
mode_name = g_strdup("DC output");
if (globals.ChannelState[channel].func_mode==dc_mode_on) {
@@ -3030,6 +3046,14 @@ static int Submenu_Implement_Changes(void)
return error_num;
}
break;
+ case mode_pw_ew:
+ if (error_num=Set_Func(channel,pulse_mode_on)) {
+ return error_num;
+ }
+ if (error_num=Set_Pwmode(channel,pw_ew_ext)) {
+ return error_num;
+ }
+ break;
case mode_pw_dc:
if (error_num=Set_Func(channel,dc_mode_on)) {
return error_num;