summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--menus.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/menus.c b/menus.c
index c853ca5..6b0cea4 100644
--- a/menus.c
+++ b/menus.c
@@ -144,7 +144,8 @@
#define mode_ampl_fixed_point9 8900
#define mode_freq_ext2 9000
-
+#define mode_route1 9100
+#define mode_route2 9200
#define Submenu_maximum_entries 10
@@ -1585,8 +1586,16 @@ static void Submenu_Display(int change_selection)
} else {
title = g_strdup ("Anode pin:");
}
- Submenu_Numeric_Parameter=Show_route_primary+channel;
- Submenu_max_entry=0;
+
+ // use modes for 2 outputs, adjust knob for 16 pins
+ if (globals.Flash.routing_max_pins[channel] == 2) {
+ Submenu_max_entry=1;
+ Submenu_Structure[0]=mode_route1;
+ Submenu_Structure[1]=mode_route2;
+ } else {
+ Submenu_Numeric_Parameter=Show_route_primary+channel;
+ Submenu_max_entry=0;
+ }
break;
case Submenu1_route_secondary:
@@ -1967,7 +1976,19 @@ static void Submenu_Display(int change_selection)
}
break;
+ case mode_route1:
+ mode_name = g_strdup("1");
+ if (globals.Flash.route_primary == 1) {
+ current_operating_mode=i;
+ }
+ break;
+ case mode_route2:
+ mode_name = g_strdup("2");
+ if (globals.Flash.route_primary == 2) {
+ current_operating_mode=i;
+ }
+ break;
case mode_1200:
mode_name = g_strdup("1200 baud");
@@ -3229,6 +3250,18 @@ static int Submenu_Implement_Changes(void)
return error_num;
}
break;
+
+ case mode_route1:
+ if (error_num=Set_Route(channel,ROUTE_PRIMARY,1)) {
+ return error_num;
+ }
+ break;
+ case mode_route2:
+ if (error_num=Set_Route(channel,ROUTE_PRIMARY,2)) {
+ return error_num;
+ }
+ break;
+
case mode_load:
globals.MenuStatus.Selected_Submenu=Submenu2_load;
call_new_submenu=YES;