diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-23 10:22:29 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-23 10:22:29 -0400 |
commit | caa8ad5d4afb0781ea5ad002d0ce5c01c233cfd9 (patch) | |
tree | 038763f9e90ffb59030ccdc4b54e935eb41a2354 | |
parent | d098bec4aad4dae2c6ecd2db6a55ae9ca4cad525 (diff) |
add startup messages for LCD
-rw-r--r-- | error_utils.c | 2 | ||||
-rw-r--r-- | instr-daemon.c | 12 | ||||
-rw-r--r-- | lcd.c | 7 | ||||
-rw-r--r-- | lcd.h | 3 |
4 files changed, 19 insertions, 5 deletions
diff --git a/error_utils.c b/error_utils.c index 75e0219..50a0af8 100644 --- a/error_utils.c +++ b/error_utils.c @@ -137,7 +137,7 @@ void queue_error_and_display_on_LCD(int error_num) { gchar* response = NULL; queue_error_and_get_text(&response, error_num); - LCD_display_error_message (response); + LCD_display_extended_message (response, 1); } diff --git a/instr-daemon.c b/instr-daemon.c index 7f42a62..fea5664 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -7,6 +7,7 @@ #include "device-functions.h" #include <stdlib.h> #include <ctype.h> +#include <glib.h> #define STDIN_BUF_SIZE 1024 @@ -231,8 +232,17 @@ int main(int argc, char **argv) g_type_init (); LCD_initialize(); - bus_init(); + LCD_write(0,0,"Starting..."); + initFlash (&globals.Flash, 0); + + gchar *message = g_strdup_printf ("%s, S/N %s", globals.Flash.model_num, globals.Flash.serial_num); + LCD_display_extended_message (message, 0); + g_free (message); + + // FIXME - copy init stuff from FW411.C + + bus_init(); Main_Rst(); //register stdin channel @@ -281,7 +281,7 @@ void LCD_initialize(void) } -void LCD_display_error_message(char *response) +void LCD_display_extended_message(char *response, gboolean show_change_message) { char *row0 = NULL; char *row1 = NULL; @@ -295,7 +295,10 @@ void LCD_display_error_message(char *response) LCD_write(0,0,row0); LCD_write(1,0,row1); LCD_write(2,0,row2); - LCD_write(3,0,Press_Change_Message); + + if (show_change_message) { + LCD_write(3,0,Press_Change_Message); + } g_free (row0); g_free (row1); @@ -1,7 +1,8 @@ #define Press_Change_Message "Push CHANGE to continue." +#include <glib.h> -void LCD_display_error_message(char *response); +void LCD_display_extended_message(char *response, gboolean show_change_message); void LCD_clear(); void LCD_write(int row, int col, char *LCD_string); void LCD_initialize(void); |