[Lcdproc] wrapping around to last menu entry issues

Markus Dolze bsdfan at nurfuerspam.de
Wed Dec 2 19:15:18 UTC 2009


Michael K. wrote:
> Hi;
>
>   I'm using a CrystalFontz CFA 635 LCD, and since I don't have any
> other LCD to test, I don't know if this problem can be easily reproduced.
>
> Here is the problem: there is no wrapping up to the last menu entry
> when I press "UP" while my cursor is on the first menu entry:
> actually, the "title" line shifts to the second line and I get a very
> weird result.
>
> I made a little fix, which doesn't wrap, but actually prevents the
> title bar from shifting in a dirty manner. That's in "server/menu.c"
> around line 712 (I used CVS-current-20091103 version, but I  had the
> same problem with Ubuntu's packaged version):
> else if (menu->data.menu.selector_pos == 0)
> {
>   menu->data.menu.selector_pos = 0;
>   menu->data.menu.scroll = 0;
> }
>   
> I know that this workaround is very dirty, but since I just wanted to
> fix my problem, I just spent 5 minutes in the code (actually I hacked
> some code that did the right thing, but the title bar wasn't displayed
> when I pressed the "up" key while having the cursor on the first line,
> before jumping to the last line)
>
> By the way, I have another question: Let's say that I want to create a
> menu which permits me to input an IP address using CIDR notation (i.e.
> "192.168.31.5/16 <http://192.168.31.5/16>"), is there a way to do so ?
> Or is there any documention explaining how to add custom menu types in
> LCDd ? (or someone who can explain this maybe ? :))
>
> Thanks.
>
> Regards, Michael
>
> -- 
Hi,

I tried reproducing your problem, but cannot find exactly the error.
Here is what I observed:

First, I enter the menu by and then go to the 'screens' submenu. It
lists all available screens to select one. The menu looks like this (Fig.1):

       +--------------------+
       |## Screens #########|
       |>_server_screen >   |
       | C >                |
       | I >               v|
       +--------------------+

As I scroll down, if I reach the end of the currently visible screen
(fig 1), the whole screen is moved up one row and the title disappears
(Fig.2):

       +--------------------+
       | _server_screen >  ^|
       | C >                |
       | I >                |
       |>M >               v|
       +--------------------+

Now I scroll down more until I reach the bottom of the list (Fig. 3):

       +--------------------+
       | M >               ^|
       | L >                |
       | T >                |
       |>N >                |
       +--------------------+

If I now press the 'down' key again, LCDd jumps to the top of the list
and shows fig 1 again!

Now I started the other way round. I moved down to the bottom of the
list (like fig. 3) and the press the UP key until I reached the top of
the list (Fig. 4)

       +--------------------+
       |>_server_screen >  ^|
       | C >                |
       | I >                |
       | M >               v|
       +--------------------+

On pressing the 'up' key again, LCDd jumps to the bottom of the list
(Fig. 5):

       +--------------------+
       | M >               ^|
       | L >                |
       | T >                |
       |>N >                |
       +--------------------+

Note the position of the caret character '>'.

The above was made using the curses driver (although I replaced the
graphic characters), but I tried with real displays as well and got the
same result.

To sum up: I can see LCDd wrapping around in the menu on pressing the UP
key. The only thing is that the title is not displayed if I reach the
top of the menu. I didn't see the title line scrolling down to row 2 as
you saw it.

Regards,
Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.omnipotent.net/pipermail/lcdproc/attachments/20091202/87e2466a/attachment.htm>


More information about the LCDproc mailing list