summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:49:54 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:49:54 -0500
commit6f54d6f2efeb88630e69cd673f5be55e16735f22 (patch)
tree5a4757adfb20e2fe9b7fe66bb3b9135389cb4774 /menus.c
parent26fbe0556b9260c29ac1aa082d7ce3baacadb665 (diff)
removed parity and databit settings, because they are now automatic
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c111
1 files changed, 17 insertions, 94 deletions
diff --git a/menus.c b/menus.c
index 874f120..aa231ea 100644
--- a/menus.c
+++ b/menus.c
@@ -1583,23 +1583,6 @@ static void Submenu_Display(int change_selection)
Submenu_Structure[3]=mode_9600;
break;
- case Submenu2_rs232_databits:
- title = g_strdup ("Data Bits:");
- Submenu_max_entry=1;
-
- Submenu_Structure[0]=mode_7bits;
- Submenu_Structure[1]=mode_8bits;
- break;
-
- case Submenu2_rs232_parity:
- title = g_strdup ("Parity:");
- Submenu_max_entry=2;
-
- Submenu_Structure[0]=mode_par_none;
- Submenu_Structure[1]=mode_par_even;
- Submenu_Structure[2]=mode_par_odd;
- break;
-
case Submenu2_rs232_stopbits:
title = g_strdup ("Stop Bits:");
Submenu_max_entry=1;
@@ -1977,36 +1960,6 @@ static void Submenu_Display(int change_selection)
current_operating_mode=i;
}
break;
- case mode_7bits:
- strcpy(mode_name[i],"7 bits");
- if (globals.Flash.databits==7) {
- current_operating_mode=i;
- }
- break;
- case mode_8bits:
- strcpy(mode_name[i],"8 bits");
- if (globals.Flash.databits==8) {
- current_operating_mode=i;
- }
- break;
- case mode_par_none:
- strcpy(mode_name[i],"None");
- if (globals.Flash.parity==rs232_parity_none) {
- current_operating_mode=i;
- }
- break;
- case mode_par_even:
- strcpy(mode_name[i],"Even");
- if (globals.Flash.parity==rs232_parity_even) {
- current_operating_mode=i;
- }
- break;
- case mode_par_odd:
- strcpy(mode_name[i],"Odd");
- if (globals.Flash.parity==rs232_parity_odd) {
- current_operating_mode=i;
- }
- break;
case mode_1bit:
strcpy(mode_name[i],"1 bit");
if (globals.Flash.stopbits==1) {
@@ -2763,11 +2716,11 @@ static void Nonstd_menu_default_rs232(void)
LCD_clear(); /*0123456789012345678901234567890123456789*/
LCD_write(0,0,"The RS232 settings are now: 1200 baud, ");
- LCD_write(1,0,"8 data bits, no parity, 1 stop bit,");
- LCD_write(2,0,"hardware handshaking on, and echo on.");
+ LCD_write(1,0,"1 stop bit, hardware handshaking on, ");
+ LCD_write(2,0,"and echo on.");
LCD_write(3,0,Press_Change_Message);
- IO_Setup_RS232(1200, rs232_parity_none, 1, 8, 1, 1, TRUE);
+ IO_Setup_RS232(1200, 1, 1, 1, TRUE);
Menu_Clear_Buttons();
@@ -3254,8 +3207,8 @@ static int Submenu_Implement_Changes(void)
Submenu_Display(NO);
break;
case mode_default_rs232:
+ call_new_submenu=YES;
Nonstd_menu_default_rs232();
- globals.MenuStatus.Selected_Submenu=Submenu1_setup;
break;
case mode_model_info:
call_new_submenu=YES;
@@ -3287,89 +3240,59 @@ static int Submenu_Implement_Changes(void)
break;
case mode_1200:
// FIXME: check that serial menus actually work
- IO_Setup_RS232(1200, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_databits;
+ 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;
Submenu_Display(NO);
break;
case mode_2400:
- IO_Setup_RS232(2400, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_databits;
- call_new_submenu=YES;
- Submenu_Display(NO);
- break;
- case mode_4800:
- IO_Setup_RS232(4800, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_databits;
- call_new_submenu=YES;
- Submenu_Display(NO);
- break;
- case mode_9600:
- IO_Setup_RS232(9600, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_databits;
- call_new_submenu=YES;
- Submenu_Display(NO);
- break;
- case mode_7bits:
- IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, 7, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_parity;
- call_new_submenu=YES;
- Submenu_Display(NO);
- break;
- case mode_8bits:
- IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, 8, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
- globals.MenuStatus.Selected_Submenu=Submenu2_rs232_parity;
- call_new_submenu=YES;
- Submenu_Display(NO);
- break;
- case mode_par_none:
- IO_Setup_RS232(globals.Flash.baud, rs232_parity_none, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
+ IO_Setup_RS232(2400, 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_par_odd:
- IO_Setup_RS232(globals.Flash.baud, rs232_parity_odd, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
+ case mode_4800:
+ IO_Setup_RS232(4800, 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_par_even:
- IO_Setup_RS232(globals.Flash.baud, rs232_parity_even, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
+ case mode_9600:
+ IO_Setup_RS232(9600, 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, globals.Flash.parity, 1, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, 1, globals.Flash.hardhand, globals.Flash.echo, 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, globals.Flash.parity, 2, globals.Flash.databits, globals.Flash.hardhand, globals.Flash.echo, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, 2, globals.Flash.hardhand, globals.Flash.echo, 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.parity, globals.Flash.stopbits, globals.Flash.databits, 1, globals.Flash.echo, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, 1, globals.Flash.echo, FALSE);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_echo;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_hand_off:
- IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, 0, globals.Flash.echo, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, 0, globals.Flash.echo, FALSE);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_echo;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_echo_on:
- IO_Setup_RS232(globals.Flash.baud, globals.Flash.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, 1, TRUE);
+ 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.parity, globals.Flash.stopbits, globals.Flash.databits, globals.Flash.hardhand, 0, TRUE);
+ IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, globals.Flash.hardhand, 0, TRUE);
globals.MenuStatus.Selected_Submenu=Submenu1_setup;
break;
}