]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2003-11-16 09:45:49 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 16 Nov 2003 09:45:49 +0000 (09:45 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 16 Nov 2003 09:45:49 +0000 (09:45 +0000)
Crystalfontz changes, small glitch in getopt() fixed

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

Crystalfontz.c
MatrixOrbital.c
lcd4linux.c

index 0b5af42713deaab96fd070d031c1064905f2e997..49e27ac608fb16cee8dbd0bb0898326bf34fb8be 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: Crystalfontz.c,v 1.16 2003/10/05 17:58:50 reinelt Exp $
+/* $Id: Crystalfontz.c,v 1.17 2003/11/16 09:45:49 reinelt Exp $
  *
  * driver for display modules from Crystalfontz
  *
@@ -21,6 +21,9 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * $Log: Crystalfontz.c,v $
+ * Revision 1.17  2003/11/16 09:45:49  reinelt
+ * Crystalfontz changes, small glitch in getopt() fixed
+ *
  * Revision 1.16  2003/10/05 17:58:50  reinelt
  * libtool junk; copyright messages cleaned up
  *
@@ -90,7 +93,7 @@
 #include "bar.h"
 #include "icon.h"
 
-#define XRES 5
+#define XRES 6
 #define YRES 8
 #define CHARS 8
 
@@ -179,9 +182,9 @@ static int CF_contrast (void)
 
 static void CF_define_char (int ascii, char *buffer)
 {
-  char cmd[3]="031"; // set custom char bitmap
+  char cmd[2]="\031"; // set custom char bitmap
 
-  cmd[1]=128+(char)ascii;
+  cmd[1]=(char)ascii;
   CF_write (cmd, 2);
   CF_write (buffer, 8);
 }
@@ -267,10 +270,11 @@ static int CF_init (LCD *Self)
   
   bar_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS-Icons);
   bar_add_segment(  0,  0,255, 32); // ASCII  32 = blank
-  bar_add_segment(255,255,255,255); // ASCII 255 = block
+  // Fixme
+  // bar_add_segment(255,255,255,255); // ASCII 255 = block
 
   // MR: why such a large delay?
-  usleep(350000);
+  usleep(350*1000);
 
   CF_clear(1);
 
@@ -335,7 +339,7 @@ static int CF_flush (void)
       c=bar_peek(row, col);
       if (c==-1) c=icon_peek(row, col);
       if (c!=-1) {
-       if (c!=32) c+=128; //blank
+       if (c!=32) c+=128; // non-blank
        FrameBuffer1[row*Lcd.cols+col]=(char)c;
       }
     }
index 74632aab18dda421c61865959e40838f0d014847..d2524c19bc342cda7d4d2060c63f017dd7bc1f38 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: MatrixOrbital.c,v 1.47 2003/10/22 04:19:16 reinelt Exp $
+/* $Id: MatrixOrbital.c,v 1.48 2003/11/16 09:45:49 reinelt Exp $
  *
  * driver for Matrix Orbital serial display modules
  *
@@ -22,6 +22,9 @@
  *
  *
  * $Log: MatrixOrbital.c,v $
+ * Revision 1.48  2003/11/16 09:45:49  reinelt
+ * Crystalfontz changes, small glitch in getopt() fixed
+ *
  * Revision 1.47  2003/10/22 04:19:16  reinelt
  * Makefile.in for imon.c/.h, some MatrixOrbital clients
  *
@@ -713,7 +716,6 @@ int MO_icon (int num, int seq, int row, int col)
 
 int MO_gpo (int num, int val)
 {
-  debug ("GPO(%d)=%d", num, val);
   if (num>=Lcd.gpos) 
     return -1;
 
index 271373e3f41d05792df085393b57f464575304ac..3332ba4d39bcb5662e77988dd3029ed8b8901b9d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.50 2003/10/22 04:19:16 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.51 2003/11/16 09:45:49 reinelt Exp $
  *
  * LCD4Linux
  *
@@ -22,6 +22,9 @@
  *
  *
  * $Log: lcd4linux.c,v $
+ * Revision 1.51  2003/11/16 09:45:49  reinelt
+ * Crystalfontz changes, small glitch in getopt() fixed
+ *
  * Revision 1.50  2003/10/22 04:19:16  reinelt
  * Makefile.in for imon.c/.h, some MatrixOrbital clients
  *
@@ -366,7 +369,7 @@ int main (int argc, char *argv[])
 #ifdef USE_OLD_UDELAY
   while ((c=getopt (argc, argv, "c:dFf:hilo:qv"))!=EOF) {
 #else
-  while ((c=getopt (argc, argv, "c:dFf:hilo:qv"))!=EOF) {
+  while ((c=getopt (argc, argv, "c:Ff:hilo:qv"))!=EOF) {
 #endif
     switch (c) {
     case 'c':
@@ -375,13 +378,10 @@ int main (int argc, char *argv[])
        exit(2);
       }
       break;
-    case 'd':
 #ifdef USE_OLD_UDELAY
+    case 'd':
       calibrate();
       exit(0);
-#else
-      fprintf (stderr, "delay calibration no longer supported!\n");
-      exit(1);
 #endif
     case 'F':
       running_foreground++;