]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2004-05-23 08:58:30 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 23 May 2004 08:58:30 +0000 (08:58 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 23 May 2004 08:58:30 +0000 (08:58 +0000)
icon bug with USBLCD fixed

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

drv_USBLCD.c
lcd4linux.conf.sample

index 69273afa8218564ab861ad82e9a40a83413a73b2..55b25b6b33c922e9e01224cc77d0f60d9f593916 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drv_USBLCD.c,v 1.2 2004/03/19 09:17:46 reinelt Exp $
+/* $Id: drv_USBLCD.c,v 1.3 2004/05/23 08:58:30 reinelt Exp $
  *
  * new style driver for USBLCD displays
  *
  *
  *
  * $Log: drv_USBLCD.c,v $
+ * Revision 1.3  2004/05/23 08:58:30  reinelt
+ *
+ * icon bug with USBLCD fixed
+ *
  * Revision 1.2  2004/03/19 09:17:46  reinelt
  *
  * removed the extra 'goto' function, row and col are additional parameters
@@ -116,12 +120,12 @@ static void drv_UL_command (unsigned char cmd)
 
 static void drv_UL_write (int row, int col, unsigned char *data, int len)
 {
-  int pos=(row%2)*64+(row/2)*20+col;
+  int pos = (row%2)*64 + (row/2)*20 + col;
   drv_UL_command (0x80|pos);
 
   while (len--) {
-    if(*data==0) *BufPtr++=*data;
-    *BufPtr++=*data++;
+    if(*data == 0) *BufPtr++ = 0;
+    *BufPtr++ = *data++;
   }
 
   drv_UL_send();
@@ -133,7 +137,8 @@ static void drv_UL_defchar (int ascii, unsigned char *buffer)
   
   drv_UL_command (0x40|8*ascii);
 
-  for (i=0; i<8; i++) {
+  for (i = 0; i < 8; i++) {
+    if(*buffer == 0) *BufPtr++ = 0;
     *BufPtr++ = *buffer++;
   }
 
index 9f570592f2f45231c2066334677caf52b274d103..eb1c4a003f85fdba839fa9f050de315ef64aeb7d 100644 (file)
@@ -42,7 +42,8 @@ Display HD44780-20x4 {
 #   Port '0x378'
     Bits '8'
     Size '20x4'
-    asc255bug 1
+    asc255bug 0
+    Icons 1
     Wire {
        RW     'GND'
        RS     'AUTOFD'
@@ -69,6 +70,7 @@ Display USBLCD {
     Port '/dev/usb/lcd'
     Size '20x4'
     asc255bug 1
+    Icons 1
 }
 
 
@@ -382,7 +384,8 @@ Widget Test {
 
 Layout Default {
     Row1 {
-       Col1  'OS'
+       Col1  'Heartbeat'
+       #Col1  'OS'
     }
     Row2 {
        Col1  'CPU'