summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device-functions.c12
-rw-r--r--device-functions.h2
-rw-r--r--instr-daemon.c3
-rw-r--r--menus.c26
-rw-r--r--parser.c4
5 files changed, 20 insertions, 27 deletions
diff --git a/device-functions.c b/device-functions.c
index d1fcb31..27595b4 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -4371,7 +4371,7 @@ void Main_update_shift_registers()
}
-int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash)
+int IO_Setup_RS232(int baud, char hardhand)
{
FILE* configfile = fopen("/tmp/instgettyopts", "w");
if(configfile) {
@@ -4384,13 +4384,11 @@ int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash)
globals.Flash.baud = baud;
globals.Flash.hardhand = hardhand;
- if (update_flash) {
- int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) +
- sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo);
+ int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) +
+ sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo);
- int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start);
- writeUserBlock(&globals.Flash, eprom_loc, size);
- }
+ int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start);
+ writeUserBlock(&globals.Flash, eprom_loc, size);
return OK;
}
diff --git a/device-functions.h b/device-functions.h
index 6e5287c..6e05da6 100644
--- a/device-functions.h
+++ b/device-functions.h
@@ -69,7 +69,7 @@ void Set_Sav(int setting_num);
void Main_update_shift_registers();
-int IO_Setup_RS232(int baud, char handshake, gboolean update_flash);
+int IO_Setup_RS232(int baud, char handshake);
int change_password (gchar *old_password, gchar *new_password);
diff --git a/instr-daemon.c b/instr-daemon.c
index 09675a0..9547df5 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -238,8 +238,7 @@ int main(int argc, char **argv)
GPIB_initialize();
IO_Setup_RS232( globals.Flash.baud,
- globals.Flash.hardhand,
- FALSE);
+ globals.Flash.hardhand);
/* start-up delay */
LCD_write(3,0,"Warming up, please wait... ");
diff --git a/menus.c b/menus.c
index 21c6808..d36d7df 100644
--- a/menus.c
+++ b/menus.c
@@ -2788,7 +2788,7 @@ static void Nonstd_menu_default_rs232(void)
LCD_write(2,0,"hardware handshaking on, echo on.");
LCD_write(3,0,Press_Change_Message);
- IO_Setup_RS232(1200, 1, TRUE);
+ IO_Setup_RS232(1200, 1);
Menu_Clear_Buttons();
@@ -3375,65 +3375,61 @@ static int Submenu_Implement_Changes(void)
globals.MenuStatus.Selected_Submenu=Submenu1_setup;
break;
case mode_1200:
- IO_Setup_RS232(1200, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(1200, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_2400:
- IO_Setup_RS232(2400, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(2400, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_4800:
- IO_Setup_RS232(4800, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(4800, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_9600:
- IO_Setup_RS232(9600, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(9600, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_19200:
- IO_Setup_RS232(19200, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(19200, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_38400:
- IO_Setup_RS232(38400, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(38400, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_57600:
- IO_Setup_RS232(57600, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(57600, globals.Flash.hardhand);
globals.MenuStatus.Selected_Submenu=Submenu2_rs232_hardhand;
call_new_submenu=YES;
Submenu_Display(NO);
break;
case mode_115200:
- IO_Setup_RS232(115200, globals.Flash.hardhand, FALSE);
+ IO_Setup_RS232(115200, globals.Flash.hardhand);
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, 1, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, 1);
globals.MenuStatus.Selected_Submenu=Submenu1_setup;
- call_new_submenu=YES;
- Submenu_Display(NO);
break;
case mode_hand_off:
- IO_Setup_RS232(globals.Flash.baud, 0, FALSE);
+ IO_Setup_RS232(globals.Flash.baud, 0);
globals.MenuStatus.Selected_Submenu=Submenu1_setup;
- call_new_submenu=YES;
- Submenu_Display(NO);
break;
}
diff --git a/parser.c b/parser.c
index 5fb26f8..80a9530 100644
--- a/parser.c
+++ b/parser.c
@@ -2744,7 +2744,7 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u
if (status = process_int_param (parameter, &new_baud, 8, valid_choices, NO_ON_OFF)) {
return status;
}
- return IO_Setup_RS232(new_baud, globals.Flash.hardhand, TRUE);
+ return IO_Setup_RS232(new_baud, globals.Flash.hardhand);
break;
case query_simple:
@@ -2780,7 +2780,7 @@ static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *un
return IllegalParameter;
}
- return IO_Setup_RS232(globals.Flash.baud, new_hardhand, TRUE);
+ return IO_Setup_RS232(globals.Flash.baud, new_hardhand);
break;
case query_simple: