From: Nikos M. <nm...@gn...> - 2006-10-04 03:47:08
Attachments:
multi-screens-3.patch
|
Hello, I have a crystalfontz 632 and I needed the screens to change with time. For this reason I patched lcd4linux to achieve this capability. After this patch I could use something like: Layout 'Default','Default2','Default3','Default4' in lcd4linux.conf and screens were switching every ten seconds. ps. moreover this patch includes some changes in the crystalfontz driver for the 632 model to work nicely (without displaying the cursor all the time etc). regards, Nikos |
From: Michael R. <re...@eu...> - 2006-10-05 19:04:03
|
Hi Nikos, > Hello, > I have a crystalfontz 632 and I needed the screens to change with time. > For this reason I patched lcd4linux to achieve this capability. Thank you verys much for your contribution! > After this patch I could use something like: > Layout 'Default','Default2','Default3','Default4' Now thats a very interesting idea! > in lcd4linux.conf and screens were switching every ten seconds. I think we should make these 10 seconds configurable in any way.... > ps. moreover this patch includes some changes in the crystalfontz > driver for the 632 model to work nicely (without displaying the cursor > all the time etc). Anyway, I won't apply your patch directly, because it's too big. could you please create a small patch for your CF632 model? I'll apply this one immediately... For your 'big' patch with changing layouts, I first want to understand it. I've seen that you added a 'clear' method to all drivers. I did not do so in the past, because I think it's not necessary. All drivers read from the 'generic' framebuffer, so it should be sufficient to clear the framebuffer. bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Nikos M. <nm...@gn...> - 2006-10-08 14:43:26
|
On 10/5/06, Michael Reinelt <re...@eu...> wrote: > Hi Nikos, > > in lcd4linux.conf and screens were switching every ten seconds. > I think we should make these 10 seconds configurable in any way.... Indeed. I was thinking this as a preliminary patch. I am not familiar with the code base and probably some things might be done better too (like the clear command below). > > ps. moreover this patch includes some changes in the crystalfontz > > driver for the 632 model to work nicely (without displaying the cursor > > all the time etc). The patch (hand edited so may not apply): --- lcd4linux-0.10.0/drv_Crystalfontz.c 2005-05-08 07:32:44.000000000 +0300 +++ lcd4linux-0.10.0-new/drv_Crystalfontz.c 2006-10-02 11:12:48.000000000 +0300 @@ -744,7 +743,10 @@ { switch (Protocol) { case 1: - drv_generic_serial_write("\014", 1); + /* it was 014 but on 632 is 012. + */ + drv_generic_serial_write("\012", 1); + drv_generic_serial_write("\004", 1); /* also disable the cursor */ break; case 2: case 3: @@ -757,10 +759,11 @@ /* init sequences for 626, 632, 634, 636 */ static void drv_CF_start_1(void) { - drv_generic_serial_write("\014", 1); /* Form Feed (Clear Display) */ - drv_generic_serial_write("\004", 1); /* hide cursor */ + drv_generic_serial_write("\012", 1); /* Form Feed (Clear Display) */ drv_generic_serial_write("\024", 1); /* scroll off */ drv_generic_serial_write("\030", 1); /* wrap off */ + drv_generic_serial_write("\004", 1); /* cursor off... doesn't seem to work here */ + } These changes were because the \004 command on init didn't disable the cursor for me thus I included it on every screen cleanup. Also the 014 command although seemed to work, it is something else on my CZ632 (014=backlight control). Thus I changed it with 012 which is the form feed. regards, Nikos |
From: Till H. (Lists) <li...@ha...> - 2006-10-09 17:31:49
|
Hi, On Tuesday 03 October 2006 01:25, Nikos Mavrogiannopoulos wrote: > After this patch I could use something like: > Layout 'Default','Default2','Default3','Default4' This is really cool. May i repeat my ideas regarding this issue? This is the first big step into something i think would be really useful and you are already so close, it's just a tiny step to make it working: - Have multiple layout sections (you did that) - start with the first one in the layout list (you also did this) - have "switch" events in each layout to switch to another layout e.g. // to switch to Layout "Default2" after 10 seconds: switch timer 10 "Default2" // or (just a different syntax) after 10 "Default2" // to switch to Layout "Default3" after button 'down' was pressed: switch key 'down' 'pressed' "Default3" // or (again just a different syntax) onkey 'down' 'pressed' "Default3" A layout may then have at most one timer switch and as many key switches as you want. This would even allow for the most complex menus. You'd have a Layout for each state the menu can be in. And with a press of a key you can switch to another layout. And if you don't select something in the menu you can make it return to the main screen after some timeout. And you can build any type of menu, e.g. A set of tabs in the top display line. Or a menu item in each line with one being highlighted. You could basically do every kind of menu and the most complex displays .... this would be so cool .... Till -- Dr.Ing. Till Harbaum <ti...@ha...> http://www.harbaum.org/till |