diff options
-rw-r--r-- | device-functions.c | 2 | ||||
-rw-r--r-- | menus.c | 30 |
2 files changed, 9 insertions, 23 deletions
diff --git a/device-functions.c b/device-functions.c index 41c62a5..1b2a888 100644 --- a/device-functions.c +++ b/device-functions.c @@ -14,7 +14,7 @@ void idn_string(gchar** response) { - *response = g_strdup_printf ("AVTECH ELECTROSYSTEMS,%s,%s,%s", + *response = g_strdup_printf ("AVTECH ELECTROSYSTEMS,%s,%s,v%s", globals.Flash.model_num, globals.Flash.serial_num, FW_VERSION); @@ -150,6 +150,8 @@ #define Show_avrq_ampl 1900 +// FIXME - eliminate fixed width variables + /* KEY MENU-JUGGLING VARIABLES - controlling what is actually shown on the display */ char temp[LCD_col_width+1]; @@ -2796,39 +2798,23 @@ static void Nonstd_menu_default_rs232(void) static void Nonstd_menu_model_info(void) { - // FIXME - better string handling + // FIXME - test this menu - char response[LCD_cols+1]; - int i; - char model[32]; - char serial_num[16]; + gchar *response; LCD_clear(); - i=-1; - do { - ++i; - model[i] = toupper(globals.Flash.model_num[i]); - } while (model[i]); - i=-1; - do { - ++i; - serial_num[i] = toupper(globals.Flash.serial_num[i]); - } while (serial_num[i]); - /*0123456789012345678901234567890123456789*/ LCD_write(0,0,"Avtech Electrosystems Ltd. - since 1975"); LCD_write(1,0,"Visit us at www.avtechpulse.com!"); LCD_write(2,0,"Model: "); - LCD_write(2,7,model); - - strcpy(response,"SN:"); - strcat(response,serial_num); - strcat(response,","); - strcat(response,FW_VERSION); + LCD_write(2,7,globals.Flash.model_num); + response = g_strdup_printf ("SN:%s,v%s", globals.Flash.serial_num, FW_VERSION); LCD_write(3,0,response); + g_free (response); + LCD_write(3,27,"Press CHANGE."); globals.MenuStatus.Nonstd_Display=YES; |