]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2003-09-11 04:09:52 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 11 Sep 2003 04:09:53 +0000 (04:09 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 11 Sep 2003 04:09:53 +0000 (04:09 +0000)
minor cleanups

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@240 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

HD44780.c
M50530.c
MatrixOrbital.c
USBLCD.c
icon.c
processor.c

index 1db6df27065379e9e0586e08d5e0d23cf317601d..b59aff4a95717c324cac12145f97da90a31c9de5 100644 (file)
--- a/HD44780.c
+++ b/HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: HD44780.c,v 1.39 2003/09/10 03:48:22 reinelt Exp $
+/* $Id: HD44780.c,v 1.40 2003/09/11 04:09:52 reinelt Exp $
  *
  * driver for display modules based on the HD44780 chip
  *
@@ -27,6 +27,9 @@
  *
  *
  * $Log: HD44780.c,v $
+ * Revision 1.40  2003/09/11 04:09:52  reinelt
+ * minor cleanups
+ *
  * Revision 1.39  2003/09/10 03:48:22  reinelt
  * Icons for M50530, new processing scheme (Ticks.Text...)
  *
@@ -504,7 +507,7 @@ int HD_init (LCD *Self)
 
   if (cfg_number("Icons", 0, 0, CHARS, &Icons)<0) return -1;
   if (Icons>0) {
-    info ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
+    debug ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
     icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, HD_define_char);
     Self->icons=Icons;
     Lcd.icons=Icons;
index f43d9e2b3cf5fd1535707bd803a14f9b36061484..bf7d245522c00707595cc73a6800c007951c52bd 100644 (file)
--- a/M50530.c
+++ b/M50530.c
@@ -1,4 +1,4 @@
-/* $Id: M50530.c,v 1.14 2003/09/10 03:48:22 reinelt Exp $
+/* $Id: M50530.c,v 1.15 2003/09/11 04:09:53 reinelt Exp $
  *
  * driver for display modules based on the M50530 chip
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: M50530.c,v $
+ * Revision 1.15  2003/09/11 04:09:53  reinelt
+ * minor cleanups
+ *
  * Revision 1.14  2003/09/10 03:48:22  reinelt
  * Icons for M50530, new processing scheme (Ticks.Text...)
  *
@@ -238,7 +241,7 @@ int M5_init (LCD *Self)
   
   if (cfg_number("Icons", 0, 0, CHARS, &Icons)<0) return -1;
   if (Icons>0) {
-    info ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
+    debug ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
     icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, M5_define_char);
     Self->icons=Icons;
     Lcd.icons=Icons;
index bf0c48f92c02c6da012b2c0c1adde6aef4f87e93..ac947eb3cb212edff13d826070edf540ab5f98e7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: MatrixOrbital.c,v 1.39 2003/09/10 03:48:23 reinelt Exp $
+/* $Id: MatrixOrbital.c,v 1.40 2003/09/11 04:09:53 reinelt Exp $
  *
  * driver for Matrix Orbital serial display modules
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: MatrixOrbital.c,v $
+ * Revision 1.40  2003/09/11 04:09:53  reinelt
+ * minor cleanups
+ *
  * Revision 1.39  2003/09/10 03:48:23  reinelt
  * Icons for M50530, new processing scheme (Ticks.Text...)
  *
@@ -376,7 +379,7 @@ static int MO_init (LCD *Self, int protocol)
 
   if (cfg_number("Icons", 0, 0, CHARS, &Icons)<0) return -1;
   if (Icons>0) {
-    info ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
+    debug ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
     icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, MO_define_char);
     Self->icons=Icons;
     Lcd.icons=Icons;
index 55917c4b213c12b3f871ea8e36b670e8460d020a..47c43b0fca4a8eba869a2a6db43e213e686074ca 100644 (file)
--- a/USBLCD.c
+++ b/USBLCD.c
@@ -1,4 +1,4 @@
-/* $Id: USBLCD.c,v 1.16 2003/09/10 03:48:23 reinelt Exp $
+/* $Id: USBLCD.c,v 1.17 2003/09/11 04:09:53 reinelt Exp $
  *
  * Driver for USBLCD ( see http://www.usblcd.de )
  * This Driver is based on HD44780.c
@@ -22,6 +22,9 @@
  *
  *
  * $Log: USBLCD.c,v $
+ * Revision 1.17  2003/09/11 04:09:53  reinelt
+ * minor cleanups
+ *
  * Revision 1.16  2003/09/10 03:48:23  reinelt
  * Icons for M50530, new processing scheme (Ticks.Text...)
  *
@@ -286,7 +289,7 @@ int USBLCD_init (LCD *Self)
   
   if (cfg_number("Icons", 0, 0, CHARS, &Icons)<0) return -1;
   if (Icons>0) {
-    info ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
+    debug ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
     icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, USBLCD_define_char);
     Self->icons=Icons;
     Lcd.icons=Icons;
diff --git a/icon.c b/icon.c
index a43f00793f81b0d5ca826d5af84cb2b0888a69df..b52fe95c30c8a06ffd17245a6fcdffe858530111 100644 (file)
--- a/icon.c
+++ b/icon.c
@@ -1,4 +1,4 @@
-/* $Id: icon.c,v 1.6 2003/09/10 14:01:53 reinelt Exp $
+/* $Id: icon.c,v 1.7 2003/09/11 04:09:53 reinelt Exp $
  *
  * generic icon and heartbeat handling
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: icon.c,v $
+ * Revision 1.7  2003/09/11 04:09:53  reinelt
+ * minor cleanups
+ *
  * Revision 1.6  2003/09/10 14:01:53  reinelt
  * icons nearly finished\!
  *
@@ -208,5 +211,8 @@ int icon_draw (int num, int seq, int row, int col)
 
 int icon_peek (int row, int col)
 {
-  return Screen[row*COLS+col];
+  if (Screen) 
+    return Screen[row*COLS+col];
+  else
+    return -1;
 }
index e25ba0ab017a41c8d09ee7b6a9ffc3b24a696a9d..0dd998e42af1c4f911eaacf2a7ead88890de9612 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.44 2003/09/10 15:59:39 reinelt Exp $
+/* $Id: processor.c,v 1.45 2003/09/11 04:09:53 reinelt Exp $
  *
  * main data processing
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: processor.c,v $
+ * Revision 1.45  2003/09/11 04:09:53  reinelt
+ * minor cleanups
+ *
  * Revision 1.44  2003/09/10 15:59:39  reinelt
  * minor cleanups
  *
@@ -705,8 +708,10 @@ static char *process_row (char *data, int row, int len)
       }
       
     } else if (*s=='&') {
-      lcd_icon(*(++s)-'0', 0, row, p-buffer+1);
-      *p++='\t';
+      if (lcd_icon(*(++s)-'0', 0, row, p-buffer+1)<0)
+       *p++='*'; // error
+      else
+       *p++='\t'; // all ok
       
     } else {
       *p++=*s;
@@ -841,7 +846,16 @@ void process_init (void)
   tack=tick;
   if (tack>tick_icon) tack=tick_icon;
 
-  debug ("using tick=%d msec, tack=%d msec", tick, tack);
+  debug ("========================");
+  debug ("Timings:");
+  debug ("%3d msec Text updates", tick_text);
+  debug ("%3d msec Bar  updates", tick_bar );
+  debug ("%3d msec Icon updates", tick_icon);
+  debug ("%3d msec GPO  updates", tick_gpo );
+  debug ("------------------------");
+  debug ("%3d msec data collection", tick);
+  debug ("%3d msec data processing", tack);
+  debug ("========================");
 
   for (i=1; i<=lines; i++) {
     char buffer[8], *p;