diff options
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 64 |
1 files changed, 61 insertions, 3 deletions
@@ -129,8 +129,12 @@ #define mode_network 7200 #define mode_password 7300 #define mode_selfcal 7400 +#define mode_19200 7500 +#define mode_38400 7600 +#define mode_57600 7700 +#define mode_115200 7800 -#define Submenu_maximum_entries 8 /* used to be 4, before scrolling lists were added */ +#define Submenu_maximum_entries 10 /* used to be 4, before scrolling lists were added */ /* what parameter to adjust */ #define Show_frequency 0 @@ -1574,13 +1578,18 @@ static void Submenu_Display(int change_selection) case Submenu2_rs232_baud: title = g_strdup ("Baud Rate:"); - Submenu_max_entry=3; + Submenu_max_entry=7; // FIXME: generate structure from valid baud rate list Submenu_Structure[0]=mode_1200; Submenu_Structure[1]=mode_2400; Submenu_Structure[2]=mode_4800; Submenu_Structure[3]=mode_9600; + Submenu_Structure[4]=mode_19200; + Submenu_Structure[5]=mode_38400; + Submenu_Structure[6]=mode_57600; + Submenu_Structure[7]=mode_115200; + break; case Submenu2_rs232_stopbits: @@ -1960,6 +1969,31 @@ static void Submenu_Display(int change_selection) current_operating_mode=i; } break; + case mode_19200: + strcpy(mode_name[i],"19200 baud"); + if (globals.Flash.baud==19200) { + current_operating_mode=i; + } + break; + case mode_38400: + strcpy(mode_name[i],"38400 baud"); + if (globals.Flash.baud==38400) { + current_operating_mode=i; + } + break; + case mode_57600: + strcpy(mode_name[i],"57600 baud"); + if (globals.Flash.baud==57600) { + current_operating_mode=i; + } + break; + case mode_115200: + strcpy(mode_name[i],"115200 baud"); + if (globals.Flash.baud==115200) { + current_operating_mode=i; + } + break; + case mode_1bit: strcpy(mode_name[i],"1 bit"); if (globals.Flash.stopbits==1) { @@ -3239,7 +3273,6 @@ static int Submenu_Implement_Changes(void) globals.MenuStatus.Selected_Submenu=Submenu1_setup; break; case mode_1200: - // FIXME: check that serial menus actually work IO_Setup_RS232(1200, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; call_new_submenu=YES; @@ -3263,6 +3296,31 @@ static int Submenu_Implement_Changes(void) call_new_submenu=YES; Submenu_Display(NO); break; + case mode_19200: + IO_Setup_RS232(19200, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + call_new_submenu=YES; + Submenu_Display(NO); + break; + case mode_38400: + IO_Setup_RS232(38400, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + call_new_submenu=YES; + Submenu_Display(NO); + break; + case mode_57600: + IO_Setup_RS232(57600, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + call_new_submenu=YES; + Submenu_Display(NO); + break; + case mode_115200: + IO_Setup_RS232(115200, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + call_new_submenu=YES; + Submenu_Display(NO); + break; + case mode_1bit: IO_Setup_RS232(globals.Flash.baud, 1, globals.Flash.hardhand, globals.Flash.echo, FALSE); globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; |