LCDproc development and user support list

Text archives Help


[Lcdproc] patch for CwLnx display corruption


Chronological Thread 
  • From: gideon.tsang AT cwlinux.com (Gideon)
  • Subject: [Lcdproc] patch for CwLnx display corruption
  • Date: Wed May 9 10:49:01 2007

Just noticed someone submitted a patch for that around a week ago.
Thanks :) I'll do some testing then.

BTW, the key press response is really slow, unless I reduce the
RENDER_FREQ to under 4 frames per second. Any better idea to fix that?

BR,

Gideon Tsang



Gideon wrote:
> Hi all,
>
> The CwLnx driver displays corrupted data since v0.5.x. The display has
> problem handing the data if a string of characters is sent at once.
> Attached is the patch against v0.5.2.
>
> BR,
>
> Gideon Tsang
>
>
> ------------------------------------------------------------------------
>
> diff -ru -xCVS -x'.#*' -x'*.so' -x'*~' -x'*conf*' -x'*.P*' -x'Makefile*'
> lcdproc-0.5.2.orig/server/drivers/CwLnx.c
> lcdproc-0.5.2/server/drivers/CwLnx.c
> --- lcdproc-0.5.2.orig/server/drivers/CwLnx.c 2007-04-14 22:38:14.000000000
> +0800
> +++ lcdproc-0.5.2/server/drivers/CwLnx.c 2007-05-09 17:09:44.000000000
> +0800
> @@ -153,17 +153,17 @@
>
> static int Write_LCD(int fd, char *c, int size)
> {
> - int rc;
> + int rc, i;
> int retries = 30;
>
> - do {
> - rc = write(fd, c, size);
> - if (rc == size)
> - break;
> - usleep(DELAY);
> -
> - } while (--retries > 0);
> -
> + for (i = 0; i < size; i++) {
> + do {
> + rc = write(fd, &c[i], 1);
> + if (rc == 1)
> + break;
> + usleep(DELAY);
> + } while (--retries > 0);
> + }
> return rc;
> }





Archive powered by MHonArc 2.6.18.

Top of page