diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:57:01 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:57:01 +0900 |
commit | 5161a54e189b59d8115a81b75d930906bb9af882 (patch) | |
tree | 626d9cdd97241466b41ea1d2f4b1d9c4153d59d9 /device-functions.c | |
parent | df12b3e0ee4c0ae8531cf9c11052fa40172bba24 (diff) |
fix RS232 menu - menu did not stored new settings to flash
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 12 |
1 files changed, 5 insertions, 7 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; } |