LCDproc development and user support list

Text archives Help

[Lcdproc] HD44780-winamp gets overflooded with Hearts after upgrading to CVS

Chronological Thread 
  • From: dura-zell AT (Sven Mertens)
  • Subject: [Lcdproc] HD44780-winamp gets overflooded with Hearts after upgrading to CVS
  • Date: Thu Mar 10 14:21:01 2005

Andrés Trapanotto schrieb:
> Sven Mertens escribió:
> [For complete thread please refer to the archive]
>>> Well, I was looking the code and I think that the problem is that
>>> it is "clearing" the buffer with zero values
>>> hd44780.c: Line 240:
>>> memset(p->lcd_contents, 0, p->width * p->height);
>>> then, lcdproc sets the zero character to be a heart and the
>>> caracter generator show you a heart in every hole...
>>> You can try changing the above line in this way:
>>> hd44780.c: Line 240 (MODIFIED):
>>> memset(p->lcd_contents, ' ', p->width * p->height);
>>> So, the buffer will fills with spaces ascii=0x20 instead ascii=0x00
>>> Change this, recompile, test and tell us your experience.
>>> (Mantaining the right size=18x4 configuration)
>> Hi!
>> Thanks for your reply again. And sorry for the late answer.
>> I changed line 240, changed back to the lcdproc root directory and did a
>> make clean && ./configure --enable-drivers=hd44780,curses && make
>> Lcdproc configured and compiled without any complainments.
>> When the daemon was started, first the display was filled up with the
>> wellknown hearts. In the second line I could "T 378" from the
>> portsetting message.
>> After two seconds the damoen initialized the serverscreen. Now I could
>> see the "LCDProc Server" message in the first line, scrolling left and
>> right. In the second line I could see "Clients: 0". The remaining
>> parts of the the display were filled up with the hearts. Now, with
>> every screenupdate, the display fills up with solid white blocks.
>> Killing and starting the daemon again brought the same results.
>> After that I tried typing the commands for cleaning, configuring and
>> compiling one for one and didn't get another result. I even tried
>> compiling with another character rather than ' '. I set 'x' in the
>> line wich you specified to see if this changes something, but without
>> any changes in the result. (I've set the char back to ' ' after this
>> experiment.) So I verified again (the third time ;) ) that I modified
>> the right file, in the right directory at the right line (240).
>> Sorry to say your suggestion did not work. Is it possible that there
>> is more than one line wich cleares the display/buffer? This would
>> explain the fact that there are the hearts first and than the blocks.
>> Greetings, Sven Mertens
> Sorry, I was wrong :(
> This driver implements two buffers "framebuf" and "lcd_contents", and
> only write to the hd44780 the differences between them to save resources
> and time.
> Then, I told you that change a line that works on "lcd_contents" and
> it had no effect over the showing text.
> I'll try to do it better this time. In first, restore the line 240 to
> original cero value :|
> If you see the HD44780_clear do the thing that I told you, It fills
> framebuf with spaces :)
> If you see it you'll find that the HD44780_icon function sets the
> special caracter 0 to be the heart, and then If you see the screen
> fullfilled with hearts is because the buffer is filled with zero values ...
> I was looking in the code but I haven't found the problem :(
> You can try to put a printf ("%s", p->framebuf) in some place (at the
> end of HD44780_flush for example) to see the framebuffer contents or
> something better like some code that show the hexadecimal values :) then
> you can check if it is happen the weird things that I'm telling you ....
> Then ... tell us the news :)
> Best regards,

Hi there!

No matter with your wrong conclusion. Everybody makes mistakes, so don't
think about it any more. I'm glad that theres's someone who's trying to
help me. :)

So, back to topic :)
I modified my hd44780.c like explained by you. I inserted the 'printf'
right below the DEBUG message and before the '}' wich marks the end of
It compiled properly but didnt't show up with the framebuffer content.
After that I placed the command at the beginning of the function. This
gave me an error about an undeclared identifier. Sorry for beeing a bit
stupid but I'm not familar with C / C++ programming, I have only
experience with BASIC and PHP. :/

Btw: Compiling with "--enable-debug" didn't gave a clue whats wrong. ;)

I also tried to place a "printf ("Test");" at some places in the funtion
but the Message didnt't show up anywhere. (I tried to learn C a few
months ago but failed due the lack of time. So far as I know this should
print me a "Test" at the console but maybe I'm wrong with that. In that
case just ignore it :).)

Meanwhile I've resetted the display with a reboot of the PC wich it is
connected to. Now, as mentioned in my previous post, the display does
nothing when the daemons is started. It just shows me the two bright and
the two dark lines to tell me it is correct connected to the power.

I also tried to place your buffer message in various other places
instead of the end of HD44780_flush. But it never showed up somewhere.
Wether it is displayed on the console, nor i can see it at the display.
Let me ask a stupid question: Is this function called somewhere? I don't
know exactly what i does, but every change I made to it didn't show up
in the compiled program. I ususally recompile with the following

make clean && ./configure --enable-drivers=hd44780,curses && make

After that i do a cd into the server's dir and start it with

./LCDd -c /etc/LCDd.conf

To be sure I downloaded a fresh new tarball from the website, modified
the hd44780.c as specified by you and compiled in a clean directory.
With the same results.

I just placed the printf command in HD44780_string to see if it may
work. It didn't.

So, I attached my modified hd44780.c (Sorry for any inconvinience) for
you to look if I've done your modification as intended. Did I? If not so
take my excuse and, please, explain me what I have done wrong. I yes,
any more ideas?

Greetings and thanks in advance for your help,
Sven Mertens

Archive powered by MHonArc 2.6.18.

Top of page