LCDproc development and user support list

Text archives Help


Fwd: Re: [Lcdproc] CFontz driver buggy in LCDProc 0.5.0


Chronological Thread 
  • From: peter AT adpm.de (Peter Marschall)
  • Subject: Fwd: Re: [Lcdproc] CFontz driver buggy in LCDProc 0.5.0
  • Date: Sun Jul 16 18:52:02 2006

Hi,

On Sunday, 16. July 2006 18:41, Leeman2000 wrote:
> I've tested the patches but they haven't solved the problem.
> To be a little more precise: with no patches / edits I see the first
> line "Lcdproc Server" <hearbeat> on all four lines on the display
> and the Clients: / Screens: are flickering through the first two lines.
> If I apply the first patch I only see the four "Lcdproc Server" lines
> and no more flickering.
> The second patch seems to change nothing applied for itself, combined
> with the first one the outcome is the same as with only the first one
> applied.

I guess I have now found it. It was an error I introduced when
changing the driver: the pointer variable iterating through the
framebuffer was not reset at the end of each line.

Please try the attached patch to CFontz.c
I will also commit it to CVS so that it will be in tomorrow's nightly.

Greetings
Peter

--
Peter Marschall
peter AT adpm.de
--- CFontz.c	25 Jun 2006 15:08:42 -0000	1.33
+++ CFontz.c	16 Jul 2006 18:45:20 -0000
@@ -345,13 +345,13 @@
 CFontz_flush(Driver *drvthis)
 {
 	PrivateData *p = drvthis->private_data;
-	unsigned char out[3 * LCD_MAX_WIDTH];
 	int i;
 
 	if (p->newfirmware) {
-		unsigned char *ptr = out;
+		unsigned char out[3 * LCD_MAX_WIDTH];
 
 		for (i = 0; i < p->height; i++) {
+			unsigned char *ptr = out;
 			int j;
 
 			/* move cursor to start of (i+1)'th line */
@@ -540,9 +540,9 @@
 
 	/* set cursor position */
 	if ((x > 0) && (x <= p->width))
-		out[1] = x - 1;
+		out[1] = (unsigned char) (x - 1);
 	if ((y > 0) && (y <= p->height))
-		out[2] = y - 1;
+		out[2] = (unsigned char) (y - 1);
 	write(p->fd, out, 3);
 }
 



Archive powered by MHonArc 2.6.18.

Top of page