aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drv_G15.c9
-rw-r--r--drv_LPH7508.c10
-rw-r--r--drv_Sample.c10
-rw-r--r--drv_T6963.c9
-rw-r--r--drv_generic_graphic.c30
-rw-r--r--drv_generic_graphic.h6
-rw-r--r--drv_serdisplib.c9
-rw-r--r--lcd4linux.conf.sample64
8 files changed, 118 insertions, 29 deletions
diff --git a/drv_G15.c b/drv_G15.c
index 6242436..ef7bbae 100644
--- a/drv_G15.c
+++ b/drv_G15.c
@@ -1,4 +1,4 @@
-/* $Id: drv_G15.c,v 1.5 2006/02/08 04:55:03 reinelt Exp $
+/* $Id: drv_G15.c,v 1.6 2006/02/27 06:14:46 reinelt Exp $
*
* Driver for Logitech G-15 keyboard LCD screen
*
@@ -24,6 +24,9 @@
*
*
* $Log: drv_G15.c,v $
+ * Revision 1.6 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.5 2006/02/08 04:55:03 reinelt
* moved widget registration to drv_generic_graphic
*
@@ -184,7 +187,7 @@ static void drv_G15_blit(const int row, const int col, const int height, const i
for (r = row; r < row + height; r++) {
for (c = col; c < col + width; c++) {
- g15_image[r * 160 + c] = drv_generic_graphic_gray(r, c);
+ g15_image[r * 160 + c] = drv_generic_graphic_black(r, c);
}
}
@@ -289,7 +292,7 @@ int drv_G15_init(const char *section, const int quiet)
{
int ret;
- info("%s: %s", Name, "$Revision: 1.5 $");
+ info("%s: %s", Name, "$Revision: 1.6 $");
DEBUG("entered");
diff --git a/drv_LPH7508.c b/drv_LPH7508.c
index cd53c8e..c5a1e30 100644
--- a/drv_LPH7508.c
+++ b/drv_LPH7508.c
@@ -1,4 +1,4 @@
-/* $Id: drv_LPH7508.c,v 1.9 2006/02/08 04:55:04 reinelt Exp $
+/* $Id: drv_LPH7508.c,v 1.10 2006/02/27 06:14:46 reinelt Exp $
*
* driver for Pollin LPH7508
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_LPH7508.c,v $
+ * Revision 1.10 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.9 2006/02/08 04:55:04 reinelt
* moved widget registration to drv_generic_graphic
*
@@ -208,7 +211,7 @@ static void drv_L7_blit(const int row, const int col, const int height, const in
int a = p * SCOLS + c;
/* bit mask */
unsigned char m = 1 << (r % 8);
- if (drv_generic_graphic_gray(r, c)) {
+ if (drv_generic_graphic_black(r, c)) {
/* set bit */
Buffer1[a] |= m;
} else {
@@ -482,7 +485,7 @@ int drv_L7_init(const char *section, const int quiet)
{
int ret;
- info("%s: %s", Name, "$Revision: 1.9 $");
+ info("%s: %s", Name, "$Revision: 1.10 $");
/* real worker functions */
drv_generic_graphic_real_blit = drv_L7_blit;
@@ -509,6 +512,7 @@ int drv_L7_init(const char *section, const int quiet)
}
}
+
/* register plugins */
AddFunction("LCD::contrast", 1, plugin_contrast);
diff --git a/drv_Sample.c b/drv_Sample.c
index c57cdf3..8c0bcbd 100644
--- a/drv_Sample.c
+++ b/drv_Sample.c
@@ -1,4 +1,4 @@
-/* $Id: drv_Sample.c,v 1.6 2006/02/08 04:55:05 reinelt Exp $
+/* $Id: drv_Sample.c,v 1.7 2006/02/27 06:14:46 reinelt Exp $
*
* sample lcd4linux driver
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_Sample.c,v $
+ * Revision 1.7 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.6 2006/02/08 04:55:05 reinelt
* moved widget registration to drv_generic_graphic
*
@@ -241,9 +244,10 @@ static void drv_Sample_blit(const int row, const int col, const int height, cons
for (r = row; r < row + height; r++) {
for (c = col; c < col + width; c++) {
+ /* drv_generic_graphic_black() returns 1 if pixel is black */
/* drv_generic_graphic_gray() returns a gray value 0..255 */
/* drv_generic_graphic_rgb() returns a RGB color */
- if (drv_generic_graphic_gray(r, c)) {
+ if (drv_generic_graphic_black(r, c)) {
/* set bit */
} else {
/* clear bit */
@@ -439,7 +443,7 @@ int drv_Sample_init(const char *section, const int quiet)
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.6 $");
+ info("%s: %s", Name, "$Revision: 1.7 $");
/* display preferences */
XRES = 5; /* pixel width of one char */
diff --git a/drv_T6963.c b/drv_T6963.c
index eab3a30..a77be5a 100644
--- a/drv_T6963.c
+++ b/drv_T6963.c
@@ -1,4 +1,4 @@
-/* $Id: drv_T6963.c,v 1.19 2006/02/08 04:55:05 reinelt Exp $
+/* $Id: drv_T6963.c,v 1.20 2006/02/27 06:14:46 reinelt Exp $
*
* new style driver for T6963-based displays
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_T6963.c,v $
+ * Revision 1.20 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.19 2006/02/08 04:55:05 reinelt
* moved widget registration to drv_generic_graphic
*
@@ -374,7 +377,7 @@ static void drv_T6_blit(const int row, const int col, const int height, const in
for (r = row; r < row + height; r++) {
for (c = col; c < col + width; c++) {
unsigned char mask = 1 << (XRES - 1 - c % XRES);
- if (drv_generic_graphic_gray(r, c)) {
+ if (drv_generic_graphic_black(r, c)) {
/* set bit */
Buffer1[(r * DCOLS + c) / XRES] |= mask;
} else {
@@ -588,7 +591,7 @@ int drv_T6_init(const char *section, const int quiet)
{
int ret;
- info("%s: %s", Name, "$Revision: 1.19 $");
+ info("%s: %s", Name, "$Revision: 1.20 $");
/* real worker functions */
drv_generic_graphic_real_blit = drv_T6_blit;
diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c
index 8609bef..ca04ab2 100644
--- a/drv_generic_graphic.c
+++ b/drv_generic_graphic.c
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_graphic.c,v $
+ * Revision 1.23 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.22 2006/02/24 13:07:10 geronet
* hollow bars for graphic lcd's
*
@@ -167,8 +170,8 @@ int DROWS, DCOLS; /* display size (pixels!) */
int XRES, YRES; /* pixels of one char cell */
/* pixel colors */
-RGBA FG_COL = { R: 0xff, G: 0xff, B: 0xff, A:0xff };
-RGBA BG_COL = { R: 0x00, G: 0x00, B: 0x00, A:0xff };
+RGBA FG_COL = { R: 0x00, G: 0x00, B: 0x00, A:0xff };
+RGBA BG_COL = { R: 0xff, G: 0xff, B: 0xff, A:0xff };
RGBA BL_COL = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
RGBA NO_COL = { R: 0x00, G: 0x00, B: 0x00, A:0x00 };
@@ -633,7 +636,7 @@ int drv_generic_graphic_init(const char *section, const char *driver)
if (color)
free(color);
- color = cfg_get(Section, "basecolor", "000000ff");
+ color = cfg_get(Section, "basecolor", "00000000");
if (color2RGBA(color, &BL_COL) < 0) {
error("%s: ignoring illegal color '%s'", Driver, color);
}
@@ -660,6 +663,9 @@ int drv_generic_graphic_init(const char *section, const char *driver)
wc.draw = drv_generic_graphic_image_draw;
widget_register(&wc);
+ /* clear framebuffer */
+ drv_generic_graphic_clear();
+
return 0;
}
@@ -669,9 +675,9 @@ int drv_generic_graphic_clear(void)
int i, l;
for (i = 0; i < LCOLS * LROWS; i++)
- drv_generic_graphic_FB[0][i] = BG_COL;
+ drv_generic_graphic_FB[LAYERS-1][i] = BG_COL;
- for (l = 1; l < LAYERS; l++)
+ for (l = 0; l < LAYERS-1; l++)
for (i = 0; i < LCOLS * LROWS; i++)
drv_generic_graphic_FB[l][i] = NO_COL;
@@ -681,6 +687,12 @@ int drv_generic_graphic_clear(void)
}
+RGBA drv_generic_graphic_rgb(const int row, const int col)
+{
+ return drv_generic_graphic_blend(row, col);
+}
+
+
unsigned char drv_generic_graphic_gray(const int row, const int col)
{
RGBA p = drv_generic_graphic_blend(row, col);
@@ -688,9 +700,13 @@ unsigned char drv_generic_graphic_gray(const int row, const int col)
}
-RGBA drv_generic_graphic_rgb(const int row, const int col)
+unsigned char drv_generic_graphic_black(const int row, const int col)
{
- return drv_generic_graphic_blend(row, col);
+ RGBA p = drv_generic_graphic_blend(row, col);
+ if (p.R > 127 || p.G > 127 || p.B > 127) {
+ return 0;
+ }
+ return 1;
}
diff --git a/drv_generic_graphic.h b/drv_generic_graphic.h
index 830172a..c51dfdc 100644
--- a/drv_generic_graphic.h
+++ b/drv_generic_graphic.h
@@ -1,4 +1,4 @@
-/* $Id: drv_generic_graphic.h,v 1.11 2006/01/30 05:47:38 reinelt Exp $
+/* $Id: drv_generic_graphic.h,v 1.12 2006/02/27 06:14:46 reinelt Exp $
*
* generic driver helper for graphic displays
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_graphic.h,v $
+ * Revision 1.12 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.11 2006/01/30 05:47:38 reinelt
* graphic subsystem changed to full-color RGBA
*
@@ -89,6 +92,7 @@ extern void (*drv_generic_graphic_real_blit) (const int row, const int col, cons
/* helper function to get pixel color or gray value */
extern RGBA drv_generic_graphic_rgb(const int row, const int col);
extern unsigned char drv_generic_graphic_gray(const int row, const int col);
+extern unsigned char drv_generic_graphic_black(const int row, const int col);
/* generic functions and widget callbacks */
diff --git a/drv_serdisplib.c b/drv_serdisplib.c
index d6b003c..c54cf72 100644
--- a/drv_serdisplib.c
+++ b/drv_serdisplib.c
@@ -1,4 +1,4 @@
-/* $Id: drv_serdisplib.c,v 1.8 2006/02/08 04:55:05 reinelt Exp $
+/* $Id: drv_serdisplib.c,v 1.9 2006/02/27 06:14:46 reinelt Exp $
*
* driver for serdisplib displays
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_serdisplib.c,v $
+ * Revision 1.9 2006/02/27 06:14:46 reinelt
+ * graphic bug resulting in all black pixels solved
+ *
* Revision 1.8 2006/02/08 04:55:05 reinelt
* moved widget registration to drv_generic_graphic
*
@@ -103,7 +106,7 @@ static void drv_SD_blit(const int row, const int col, const int height, const in
for (r = row; r < row + height; r++) {
for (c = col; c < col + width; c++) {
- color = drv_generic_graphic_gray(r, c) ? SD_COL_BLACK : SD_COL_WHITE;
+ color = drv_generic_graphic_black(r, c) ? SD_COL_BLACK : SD_COL_WHITE;
serdisp_setcolour(dd, c, r, color);
}
}
@@ -310,7 +313,7 @@ int drv_SD_init(const char *section, const int quiet)
{
int ret;
- info("%s: %s", Name, "$Revision: 1.8 $");
+ info("%s: %s", Name, "$Revision: 1.9 $");
/* real worker functions */
drv_generic_graphic_real_blit = drv_SD_blit;
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index d6fd9cc..0f74bf5 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -27,6 +27,14 @@ Display LCD-Linux {
UseBusy 0
}
+Display LCD2USB {
+ Driver 'LCD2USB'
+ Size '20x2'
+ Backlight 1
+ Icons 1
+}
+
+
Display LCD2041 {
Driver 'MatrixOrbital'
Model 'LCD2041'
@@ -409,6 +417,17 @@ Widget CPU {
}
+Widget CPUinfo {
+ class 'Text'
+ expression cpuinfo('model name')
+ prefix ''
+ width 20
+ align 'M'
+ speed 100
+ update tick
+}
+
+
Widget RAM {
class 'Text'
expression meminfo('MemTotal')/1024
@@ -428,7 +447,6 @@ Widget Busy {
precision 1
align 'R'
update tick
- foreground '0000ffaa'
}
Widget BusyBar {
@@ -437,6 +455,7 @@ Widget BusyBar {
expression2 proc_stat::cpu('system', 500)
length 10
direction 'E'
+ style 'H'
update tack
}
@@ -870,6 +889,15 @@ Layout TestLayer {
}
}
+Layout TestImage {
+ Row1 {
+ Col1 'OS'
+ }
+ Layer 2 {
+ X1.Y1 'ImageTest'
+ }
+}
+
Layout L24x8 {
Row1 {
Col1 'Load'
@@ -888,6 +916,13 @@ Layout L8x2 {
}
}
+Layout L16x1 {
+ Row1 {
+ Col1 'Busy'
+ Col11 'BusyBar'
+ }
+}
+
Layout L16x2 {
Row1 {
Col1 'Busy'
@@ -902,12 +937,25 @@ Layout L16x2 {
Layout L20x2 {
Row1 {
+ Col1 'CPUinfo'
+ }
+ Row2 {
Col1 'Busy'
Col11 'BusyBar'
}
+}
+
+Layout L40x2 {
+ Row1 {
+ Col1 'OS'
+ Col21 'Busy'
+ Col31 'BusyBar'
+ }
Row2 {
- Col1 'Load'
- Col11 'LoadBar'
+ Col1 'CPU'
+ Col10 'RAM'
+ Col21 'Load'
+ Col31 'LoadBar'
}
}
@@ -982,19 +1030,23 @@ Layout testMySQL {
#Display 'BA63'
#Display 'CT20x4'
#Display 'T6963-240x64'
-Display 'XWindow'
+#Display 'XWindow'
#Display 'USBLCD'
#Display 'BWCT'
#Display 'Image'
#Display 'Trefon'
+#Display 'LCD2USB'
#Display 'LPH7508-serdisplib'
-#Display 'LPH7508'
+Display 'LPH7508'
#Layout 'Default'
-Layout 'TestLayer'
+#Layout 'TestLayer'
+Layout 'TestImage'
#Layout 'L8x2'
+#Layout 'L16x1'
#Layout 'L16x2'
#Layout 'L20x2'
+#Layout 'L40x2'
#Layout 'Test'
#Layout 'Test2'
#Layout 'TestGPO'