summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-30 14:40:07 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-30 14:40:07 -0400
commit909dc00ed36c00199c25e8e2f89bd27f27c60532 (patch)
treea3f81d62a33d8542d56115f0a29c3f6652b382b3 /menus.c
parent8003bf319954665b9269457be943ca01bb8c440e (diff)
use g_str functions in model info menu
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/menus.c b/menus.c
index 5d819d6..6857a41 100644
--- a/menus.c
+++ b/menus.c
@@ -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;