diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
commit | 74b9ff28228e3858ef4bc181a34a9acf9ca6be79 (patch) | |
tree | 97d86198073500ef287f8298d6f8df713773d037 /menus.c | |
parent | 9f693eba66b3ff9934050fd4b5c50b7660cc3096 (diff) |
remove unused stopbit and echo settings
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 108 |
1 files changed, 24 insertions, 84 deletions
@@ -1592,14 +1592,6 @@ static void Submenu_Display(int change_selection) break; - case Submenu2_rs232_stopbits: - title = g_strdup ("Stop Bits:"); - Submenu_max_entry=1; - - Submenu_Structure[0]=mode_1bit; - Submenu_Structure[1]=mode_2bits; - break; - case Submenu2_rs232_hardhand: title = g_strdup ("Handshaking:"); Submenu_max_entry=1; @@ -1608,14 +1600,6 @@ static void Submenu_Display(int change_selection) Submenu_Structure[1]=mode_hand_off; break; - case Submenu2_rs232_echo: - title = g_strdup ("Echo:"); - Submenu_max_entry=1; - - Submenu_Structure[0]=mode_echo_on; - Submenu_Structure[1]=mode_echo_off; - break; - case Submenu2_gpib_address: title = g_strdup ("GPIB Address:"); Submenu_Numeric_Parameter=Show_gpib_address+channel; @@ -1994,18 +1978,6 @@ static void Submenu_Display(int change_selection) } break; - case mode_1bit: - strcpy(mode_name[i],"1 bit"); - if (globals.Flash.stopbits==1) { - current_operating_mode=i; - } - break; - case mode_2bits: - strcpy(mode_name[i],"2 bits"); - if (globals.Flash.stopbits==2) { - current_operating_mode=i; - } - break; case mode_hand_hard: strcpy(mode_name[i],"Hardware"); if (globals.Flash.hardhand) { @@ -2018,18 +1990,6 @@ static void Submenu_Display(int change_selection) current_operating_mode=i; } break; - case mode_echo_on: - strcpy(mode_name[i],"On"); - if (globals.Flash.echo) { - current_operating_mode=i; - } - break; - case mode_echo_off: - strcpy(mode_name[i],"Off"); - if (!globals.Flash.echo) { - current_operating_mode=i; - } - break; } } @@ -2749,12 +2709,12 @@ static void Nonstd_menu_default_rs232(void) Menu_Clear_Buttons(); LCD_clear(); /*0123456789012345678901234567890123456789*/ - LCD_write(0,0,"The RS232 settings are now: 1200 baud, "); - LCD_write(1,0,"1 stop bit, hardware handshaking on, "); - LCD_write(2,0,"and echo on."); + LCD_write(0,0,"The RS232 settings are now: 1200 baud,"); + LCD_write(1,0,"auto data bits / parity, 1 stop bit,"); + LCD_write(2,0,"hardware handshaking on, echo on."); LCD_write(3,0,Press_Change_Message); - IO_Setup_RS232(1200, 1, 1, 1, TRUE); + IO_Setup_RS232(1200, 1, TRUE); Menu_Clear_Buttons(); @@ -3273,86 +3233,66 @@ static int Submenu_Implement_Changes(void) globals.MenuStatus.Selected_Submenu=Submenu1_setup; break; case mode_1200: - IO_Setup_RS232(1200, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + IO_Setup_RS232(1200, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; call_new_submenu=YES; Submenu_Display(NO); break; case mode_2400: - IO_Setup_RS232(2400, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + IO_Setup_RS232(2400, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; call_new_submenu=YES; Submenu_Display(NO); break; case mode_4800: - IO_Setup_RS232(4800, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + IO_Setup_RS232(4800, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; call_new_submenu=YES; Submenu_Display(NO); break; case mode_9600: - IO_Setup_RS232(9600, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_stopbits; + IO_Setup_RS232(9600, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; 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; + IO_Setup_RS232(19200, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; 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; + IO_Setup_RS232(38400, globals.Flash.hardhand, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; 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); + IO_Setup_RS232(57600, globals.Flash.hardhand, FALSE); globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; call_new_submenu=YES; Submenu_Display(NO); break; - case mode_2bits: - IO_Setup_RS232(globals.Flash.baud, 2, globals.Flash.hardhand, globals.Flash.echo, FALSE); + case mode_115200: + IO_Setup_RS232(115200, globals.Flash.hardhand, FALSE); globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand; call_new_submenu=YES; Submenu_Display(NO); break; + case mode_hand_hard: - IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, 1, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_echo; + IO_Setup_RS232(globals.Flash.baud, 1, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu1_setup; call_new_submenu=YES; Submenu_Display(NO); break; case mode_hand_off: - IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, 0, globals.Flash.echo, FALSE); - globals.MenuStatus.Selected_Submenu=Submenu2_rs232_echo; + IO_Setup_RS232(globals.Flash.baud, 0, FALSE); + globals.MenuStatus.Selected_Submenu=Submenu1_setup; call_new_submenu=YES; Submenu_Display(NO); break; - case mode_echo_on: - IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, globals.Flash.hardhand, 1, TRUE); - globals.MenuStatus.Selected_Submenu=Submenu1_setup; - break; - case mode_echo_off: - IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, globals.Flash.hardhand, 0, TRUE); - globals.MenuStatus.Selected_Submenu=Submenu1_setup; - break; } Main_update_shift_registers(); /* update values in pulse generator circuit */ |