You can subscribe to this list here.
2004 |
Jan
(57) |
Feb
(71) |
Mar
(80) |
Apr
(40) |
May
(49) |
Jun
(20) |
Jul
(3) |
Aug
(9) |
Sep
(8) |
Oct
(2) |
Nov
|
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(10) |
Feb
(25) |
Mar
(24) |
Apr
(26) |
May
(71) |
Jun
(35) |
Jul
(5) |
Aug
(3) |
Sep
(18) |
Oct
(4) |
Nov
(5) |
Dec
(2) |
2006 |
Jan
(50) |
Feb
(12) |
Mar
(7) |
Apr
(24) |
May
(1) |
Jun
(17) |
Jul
(51) |
Aug
(38) |
Sep
(38) |
Oct
(33) |
Nov
(8) |
Dec
(13) |
2007 |
Jan
(44) |
Feb
(25) |
Mar
(21) |
Apr
(68) |
May
(52) |
Jun
(24) |
Jul
(17) |
Aug
(12) |
Sep
(4) |
Oct
(14) |
Nov
(1) |
Dec
(3) |
2008 |
Jan
(9) |
Feb
(1) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
|
2009 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(21) |
Jun
(5) |
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2010 |
Jan
(15) |
Feb
(36) |
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
2011 |
Jan
(22) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2012 |
Jan
(14) |
Feb
(6) |
Mar
(20) |
Apr
(12) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(2) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(1) |
May
(9) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
(11) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Natanael O. <no...@gm...> - 2011-01-04 14:27:05
|
New patch attached. Is just a fix for a bug introduced in my previous one for the DE-LD021. Now I'm fighting with the DE-LP14111 [1]. I expect to have something in a few hours, and send a new patch. I'll do an update just before send it to avoid conflicts. My apologizes for the previous buggy patch, Natanael. [1] http://www.sureelectronics.net/goods.php?id=1182 El 01/04/2011 03:00 AM, Michael Reinelt escribió: > Hello Natanael, > >> I bought a Sure Electronics 4x20 alphanumeric display [1] that didn't >> work with lcd4linux. >> >> Here I attach the patch that I did to make it works for me (basically >> using the same methods for protocol 3 as the DE-LD011, removing all >> hardoded values in the code except the buffer, that has now a size of 20 >> chars instead 16). > > Your patch has been applied and committed. Thanks for contributing to > LCD4Linux. > > Could you please add some Documentation to the wiki? > > > > regards, Michael > |
From: Natanael O. <no...@gm...> - 2011-01-04 12:51:53
|
Hi Michael, El 01/04/2011 03:00 AM, Michael Reinelt escribió: > Hello Natanael, > >> I bought a Sure Electronics 4x20 alphanumeric display [1] that didn't >> work with lcd4linux. >> >> Here I attach the patch that I did to make it works for me (basically >> using the same methods for protocol 3 as the DE-LD011, removing all >> hardoded values in the code except the buffer, that has now a size of 20 >> chars instead 16). > > Your patch has been applied and committed. Thanks for contributing to > LCD4Linux. > Thank you, that was fast! :) > Could you please add some Documentation to the wiki? I just added the model and a link to the vendor page in the MatrixOrbital article. After (hopefullly) my other patches, I'll take a further look to see if I'm able to improve something more in the docs. Thanks again!, Natanael. > > > > regards, Michael > |
From: Michael R. <mi...@re...> - 2011-01-04 02:27:23
|
Hi Martin, sorry for being that late in answering your question, but I'm busy busy busy busy... Thanks for your analysis, here are my comments: > First, I think that CLOCK_SKEW_DETECT_TIME_IN_S should be set to a much > higher value: > > /* delay in seconds between timer events that is considered as being > induced by clock skew */ > #define CLOCK_SKEW_DETECT_TIME_IN_S 1 > > Imagine you only have timers that trigger every two seconds (think of a > rather slow processor and/or LCD with data that rarely change). Right > now, the timers always trigger immediately instead of every two seconds > because the code assumes the delay (two seconds) is being caused by > clock skew instead of the timer. clock skew detection was added in r1027 by michux, unfortunately I couldn'd find anything useful in my archives about the background. But I agree: 1 second may be too short, probably it never showed up because everybody is using timers shorter than one second. A clean solution cold be to check if timestamp of next timer is later than "now + timer.delay"? (or probably "now + 2*timer.delay") ? I also think that the correction "set it to current" is wrong: It should be set to "now + timer+delay" or something similar. > The other "thing" seems like a real bug to me (and is of course related > to clock skew). In case a clock skew has been detected, the next > upcoming timer (and *only* that) is updated to the new time. > > Now imagine two timers of different intervals and a clock skew of one > hour (think of the transitions between summer and winter time). The > next upcoming timer (let's say number 1) is updated and triggers on. > But what about the second? If I get that right, it will not trigger for > at least a whole hour while the user awes in wonder! > > So I think we should update *all* timers: > > for (timer = 0; timer< nTimers; timer++) > Timers[timer].when = now; > > instead of only the next upcoming one: > > Timers[next_timer].when = now; I'm not sure about this: probably all the other timers would be corrected one by one as soon as they are processed (every timer should be the "next occuring timer" somethime, and then would be corrected) regards, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Michael R. <mi...@re...> - 2011-01-04 02:00:25
|
Hello Natanael, > I bought a Sure Electronics 4x20 alphanumeric display [1] that didn't > work with lcd4linux. > > Here I attach the patch that I did to make it works for me (basically > using the same methods for protocol 3 as the DE-LD011, removing all > hardoded values in the code except the buffer, that has now a size of 20 > chars instead 16). Your patch has been applied and committed. Thanks for contributing to LCD4Linux. Could you please add some Documentation to the wiki? regards, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Natanael O. <no...@gm...> - 2011-01-03 16:22:25
|
BTW, I forgot to say that the driver usb board (there are two boards, one with the display and other witht the driver and USB client) have another code: DE-LD2XV100. El 01/03/2011 05:19 PM, Natanael Olaiz escribió: > Hi, > > I bought a Sure Electronics 4x20 alphanumeric display [1] that didn't > work with lcd4linux. > > Here I attach the patch that I did to make it works for me (basically > using the same methods for protocol 3 as the DE-LD011, removing all > hardoded values in the code except the buffer, that has now a size of > 20 chars instead 16). > > I'm not sure if the corresponding code is DE-LD021 or DE-LP14112 (both > values appear in the page, and in the sticker label on the package > appears the second code over an old sticker with the first.. ??). > > > Hope it helps. > > > Best regards, and happy new year, > Natanael. > > PS: I bought some other displays that aren't working neither, so if > I'm lucky, maybe I'll send more patches later > > > > [1] > http://www.sureelectronics.net/search.php?encode=YTozOntzOjg6ImtleXdvcmRzIjtzOjg6ImRlLWxkMDIxIjtzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZSI7aToxMjk0MDcwODYxO30= > |
From: Natanael O. <no...@gm...> - 2011-01-03 16:18:47
|
Hi, I bought a Sure Electronics 4x20 alphanumeric display [1] that didn't work with lcd4linux. Here I attach the patch that I did to make it works for me (basically using the same methods for protocol 3 as the DE-LD011, removing all hardoded values in the code except the buffer, that has now a size of 20 chars instead 16). I'm not sure if the corresponding code is DE-LD021 or DE-LP14112 (both values appear in the page, and in the sticker label on the package appears the second code over an old sticker with the first.. ??). Hope it helps. Best regards, and happy new year, Natanael. PS: I bought some other displays that aren't working neither, so if I'm lucky, maybe I'll send more patches later [1] http://www.sureelectronics.net/search.php?encode=YTozOntzOjg6ImtleXdvcmRzIjtzOjg6ImRlLWxkMDIxIjtzOjg6ImNhdGVnb3J5IjtzOjE6IjAiO3M6MTg6InNlYXJjaF9lbmNvZGVfdGltZSI7aToxMjk0MDcwODYxO30= |
From: Tilman G. <til...@ho...> - 2011-01-01 21:01:46
|
Dear Michael, > Maybe we should change the behaviour to reset scrolling only if the length changes? Good idea. I would however suggest to leave the decision whether to reset or not to the user, i.e. provide an additional flag in the configuration of the text widget. Thanks Tilman |
From: Michael R. <mi...@re...> - 2011-01-01 12:01:14
|
Hi Matt, > I'd quite like to know how to contribute too. > I tweaked a driver to make it work with a unit I picked up. > Would like to make it available. Great! I think it should be documented quite well in the wiki, on the "how to write a new driver" (or "how to write a new plugin") If you need any help, let me know. -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Michael R. <mi...@re...> - 2011-01-01 10:56:46
|
Hi Til, you probably want to subscribe to the (low traffic) lcd4linux mailing lists, otherwise I have to manually accept every mail from you to go to the list.... > How can I contribute the driver now, so that it becomes part of the > distribution ? Send me the driver file itself and the output of "svn diff" as described in the "How to write a new driver" > I would write a little bit of documentation describing the hardware. Yes please, add a page in the wiki. > In addition, I have 2 items for the wish list > a) TCP-Server-Plugin: > Use Case 1: Display abitrary and changing information (like the fifo plugin) > Use Case 2: Display messages from other than the local machine. > (I think LCDProc also relies on a tcpip protocol. If this would be > integrated it would make the various clients written for lcdProc usable > for lcd4linux as well) Patches are always welcome! > b) Show sequence of layers: > Use Case: Display more infomation than fit directly onto an LCD display > by showing it sequentially. This has been discussed for ages, there is already some basic functionality in there, but I never had the time to finish it. As you may have noticed, development and especially releasing is very very slow. The "latest news" on the wiki reads "new version soon to be released", a whole year passed by, and nothing happens. This is my fault, because I'm extremly busy at my real-life job for more than two years now (you know, I get up between 2 and 3 am every day, which means really "every day"). > And I found something, that might be a bug: > lcd4linux resets the display string, if time function changes string > while it is scrolled. > > Using the configuration below on a single line display shorter that the > string will restart to display the string every second. The string > will never completely be shown. > > /etc/lcd4linux.conf > Widget Test { > class 'Text' > expression strftime(' The current time is %m/%d @ %H:%M %S',time()) > width 40 > align 'M' > speed 150 > update 1000 > } Yes, this is by design. When the string changes, also the string length may change, so that the Marquee Scrolling may no longer be necessary (or scrolling may get confused because we're on a scroll position where the new string is completely empty). Maybe we should change the behaviour to reset scrolling only if the length changes? bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Matt J. <mat...@gm...> - 2011-01-01 10:53:56
|
I'd quite like to know how to contribute too. I tweaked a driver to make it work with a unit I picked up. Would like to make it available. Regards Matt On Sat, Jan 1, 2011 at 21:33, Tilman Glotzner <til...@ho...>wrote: > Hi Micheal > > that did the trick. Thanks. > > How can I contribute the driver now, so that it becomes part of the > distribution ? > I would write a little bit of documentation describing the hardware. > > > > In addition, I have 2 items for the wish list > a) TCP-Server-Plugin: > Use Case 1: Display abitrary and changing information (like the fifo > plugin) > Use Case 2: Display messages from other than the local machine. > (I think LCDProc also relies on a tcpip protocol. If this would be > integrated it would make the various clients written for lcdProc usable for > lcd4linux as well) > b) Show sequence of layers: > Use Case: Display more infomation than fit directly onto an LCD display by > showing it sequentially. > > > > And I found something, that might be a bug: > lcd4linux resets the display string, if time function changes string while > it is scrolled. > > Using the configuration below on a single line display shorter that the > string will restart to display the string every second. The string > will never completely be shown. > > /etc/lcd4linux.conf > Widget Test { > class 'Text' > expression strftime(' The current time is %m/%d @ %H:%M %S',time()) > width 40 > align 'M' > speed 150 > update 1000 > } > > I also wish you guys a happy new year.... > > Tilman > > > Date: Sat, 1 Jan 2011 03:35:00 +0100 > > From: mi...@re... > > To: til...@ho... > > CC: sv...@ki...; lcd...@li... > > Subject: Re: [Lcd4linux-devel] Treiber einbinden > > > > > Hi Til, > > > > > 1) I am aware of the instructions to integrate a new driver. I made the > > > changes in drv.c, Makefile.am, and driver.m4, and ran the configure > script: > > > > Probably the driver is available, but not automatically selected if not > explicitely specified in 'configure > > --with-drivers=<your_driver>' > > > > Quite at the beginning of drivers.m4, you'll find a list of default > drivers, try to add yours here. > > > > > > > > happy new year! > > > > -- > > Michael Reinelt <mi...@re...> > > http://home.pages.at/reinelt > > GPG-Key 0xDF13BA50 > > ICQ #288386781 > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Lcd4linux-devel mailing list > Lcd...@li... > https://lists.sourceforge.net/lists/listinfo/lcd4linux-devel > > -- http://about.me/mattjoyce <http://about.me/mattjoyce/bio> |
From: Tilman G. <til...@ho...> - 2011-01-01 10:33:52
|
Hi Micheal that did the trick. Thanks. How can I contribute the driver now, so that it becomes part of the distribution ? I would write a little bit of documentation describing the hardware. In addition, I have 2 items for the wish list a) TCP-Server-Plugin: Use Case 1: Display abitrary and changing information (like the fifo plugin) Use Case 2: Display messages from other than the local machine. (I think LCDProc also relies on a tcpip protocol. If this would be integrated it would make the various clients written for lcdProc usable for lcd4linux as well) b) Show sequence of layers: Use Case: Display more infomation than fit directly onto an LCD display by showing it sequentially. And I found something, that might be a bug: lcd4linux resets the display string, if time function changes string while it is scrolled. Using the configuration below on a single line display shorter that the string will restart to display the string every second. The string will never completely be shown. /etc/lcd4linux.conf Widget Test { class 'Text' expression strftime(' The current time is %m/%d @ %H:%M %S',time()) width 40 align 'M' speed 150 update 1000 } I also wish you guys a happy new year.... Tilman > Date: Sat, 1 Jan 2011 03:35:00 +0100 > From: mi...@re... > To: til...@ho... > CC: sv...@ki...; lcd...@li... > Subject: Re: [Lcd4linux-devel] Treiber einbinden > > Hi Til, > > > 1) I am aware of the instructions to integrate a new driver. I made the > > changes in drv.c, Makefile.am, and driver.m4, and ran the configure script: > > Probably the driver is available, but not automatically selected if not explicitely specified in 'configure > --with-drivers=<your_driver>' > > Quite at the beginning of drivers.m4, you'll find a list of default drivers, try to add yours here. > > > > happy new year! > > -- > Michael Reinelt <mi...@re...> > http://home.pages.at/reinelt > GPG-Key 0xDF13BA50 > ICQ #288386781 |
From: Michael R. <mi...@re...> - 2011-01-01 02:35:26
|
Hi Til, > 1) I am aware of the instructions to integrate a new driver. I made the > changes in drv.c, Makefile.am, and driver.m4, and ran the configure script: Probably the driver is available, but not automatically selected if not explicitely specified in 'configure --with-drivers=<your_driver>' Quite at the beginning of drivers.m4, you'll find a list of default drivers, try to add yours here. happy new year! -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Tilman G. <til...@ho...> - 2010-12-29 09:42:48
|
Dear Michael, Dear Sven sorry for not realizing that the language spoken in the mailing list is English. 1) I am aware of the instructions to integrate a new driver. I made the changes in drv.c, Makefile.am, and driver.m4, and ran the configure script: driver.m4: ======== if test "$EFN" = "yes"; then TEXT="yes" DRIVERS="$DRIVERS drv_EFN.o" AC_DEFINE(WITH_EFN,1,[EFN + EUG driver]) fi Makfile.am: ======== ... EXTRA_lcd4linux_SOURCES= \ ... drv_EFN.c ... drv.c: ===== ... extern DRIVER drv_EFN; .... DRIVER *Driver[] = { ... #ifdef WITH_EFN &drv_EFN, #endif The isssue hower is a) config.h : /* EFN + EUG driver */ /* #undef WITH_EFN */ This should be #define WITH_EFN 1 b) Makefile: drv_EFN.o is not added in the list of objects to be linked to lcd4linux. 2) By now, I applied a patch to make rdtscl compile, and applied the changes to config.h and Makefile manually. That compiles and links. This is just not how the build chain should work .. :-) (For the patch to make rdtscl in udelay.c known see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=436332 -- your are probably aware of it). Thanks Tilman |
From: Michael R. <mi...@re...> - 2010-12-29 02:01:08
|
Hi Tilman, please note that this is an english mailing list! > ich würde gerne einen zusätzlichen Treiber für eine LED-Zeile einbinden. > Diese wird über einen TCP-Socket angesprochen. > Durch manuelles Anpassen des Makefile wird das Object-File dazugelinkt. > Trotzdem sehe ich den Treiber aber nicht, wenn > lcd4Linux -l ausführe. > > 1) Wie bekommen ich den Treiber über den configure-mechanismus eingebunden ? > 2) Was muss ich machen, dass der Treiber nicht nur in lcd4linux > eingelinkt wird, sondern ausführbar wird ? There is a page in the Wiki "How to write a new driver" https://ssl.bulix.org/projects/lcd4linux/wiki/driver_howto which should hopefully answer all your questions. Basically you'd have to modify drv.c, Makefile.am and drivers.m4 and add your new driver there. Thanks for contributing to lcd4linux! bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Tilman G. <til...@ho...> - 2010-12-28 23:22:33
|
/* $Id: drv_Sample.c 773 2007-02-25 12:39:09Z michael $ * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Sample.c $ * * sample lcd4linux driver * * Copyright (C) 2010 Tilman Glötzner <til...@ho...> * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team <lcd...@us...> * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * * exported fuctions: * * struct DRIVER drv_EFN * */ #include "config.h" #include <stdlib.h> #include <stdio.h> #include <strings.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "udelay.h" #include "plugin.h" #include "widget.h" #include "widget_text.h" #include "widget_icon.h" #include "widget_bar.h" #include "drv.h" /* text mode display */ #include "drv_generic_text.h" static char Name[] = "EFN"; char Host[256]; int Port; int DataSocket; static void drv_EFN_clear(void); /****************************************/ /*** hardware dependant functions ***/ /****************************************/ static int drv_EFN_open(const char *section) { int sockfd_conf, portno_conf,n; struct sockaddr_in serv_addr; // *********************// struct sockaddr_in conf_addr; struct hostent *server; char buffer[5]; /* open tcp sockets to config port to EUG 100 t0 set serial parameter */ /* 9600 BAUD; no parity; 1 stop bit */ // socket to config EUG portno_conf = Port + 1; sockfd_conf = socket(AF_INET, SOCK_STREAM, 0); if (sockfd_conf < 0) { error("ERROR opening config socket"); return -1; } // resolve DNS name of EFN server (= EUG 100) server = gethostbyname(Host); if (server == NULL) { error("ERROR, no such host\n"); return -1; } // socket addr for config socket bzero((char *) &conf_addr, sizeof(struct sockaddr_in)); conf_addr.sin_family = AF_INET; bcopy((char *)server->h_addr, (char *)&conf_addr.sin_addr.s_addr, server->h_length); conf_addr.sin_port = htons(portno_conf); // open config socket if (connect(sockfd_conf,(struct sockaddr *)&conf_addr, sizeof(struct sockaddr_in)) < 0) { error("ERROR connecting to config port"); return -1; } // sent config message bzero(buffer,5); buffer[0] = '4'; buffer[1] = '0'; buffer[2] = '1'; n = write(sockfd_conf,buffer,3); if (n < 0) { error("ERROR writing to config socket"); close(sockfd_conf); return -1; } close(sockfd_conf); // open data socket // socket addr for data socket bzero((char *) &serv_addr, sizeof(struct sockaddr_in)); serv_addr.sin_family = AF_INET; bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(Port); if (connect(DataSocket,(struct sockaddr*)&serv_addr, sizeof(struct sockaddr_in)) < 0) { error("ERROR connecting"); return -1; } return 0; } static int drv_EFN_close(void) { /* close whatever port you've opened */ drv_EFN_clear(); close(DataSocket); return 0; } /* dummy function that sends something to the display */ static void drv_EFN_send(const char *data, const unsigned int len) { int n; // transport command stirng to EUG 100 n = write(DataSocket,data,len); if (n < 0) { error("%s:drv_EFN_send: Failed to write to data socket\n", Name); // return(-1); } } /* text mode displays only */ static void drv_EFN_clear(void) { char *cmd; int max_char,max_cmd,k; max_char = DROWS*DCOLS; max_cmd = 3 * max_char; // each EFN module expects 3 bytes if ((cmd = malloc(max_cmd)) == NULL) { error("%s : Failed to allocate memory in drv_Sample_write\n",Name); // return -1; } else { /* do whatever is necessary to clear the display */ for(k=0; k< max_char;k++) { cmd[(3*k)+0] = 0xff; cmd[(3*k)+1] = k+1; cmd[(3*k)+2] = ' '; } drv_EFN_send(cmd, max_cmd); free(cmd); //return 0; } } /* text mode displays only */ static void drv_EFN_write(const int row, const int col, const char *data, int len) { char *cmd; int offset,i,k,max_char,max_cmd; max_char = DROWS*DCOLS; max_cmd = 3 * max_char; // each LED blocks expects a 3 byte sequence if ((cmd = (char *)malloc(max_cmd)) == NULL) { error("%s : Failed to allocate memory in drv_Sample_write\n",Name); //return -1; } else { /* do the cursor positioning here */ /* assume 0x02 to be a 'Goto' command */ offset = row*DCOLS + col + 1; for(i=max_char - offset,k=0; ((i > 0) && (k < len)); i--,k++) { cmd[(3*k)+0] = 0xff; cmd[(3*k)+1] = i; cmd[(3*k)+2] = data[k]; } /* send string to the display */ drv_EFN_send(data, 3*(k+1)); free(cmd); // return 0; } } static void drv_EFN_defchar(const int ascii, const unsigned char *matrix) { error("%s:drv_EFN_defchar: Function not supported by EFN modules\n",Name); } /* start text mode display */ static int drv_EFN_start(const char *section) { int rows = -1, cols = -1; char *s; s = cfg_get(section, "Host",NULL); if (s == NULL || *s == '\0') { error("%s: no '%s.Host' entry from %s", Name, section, cfg_source()); return -1; } if (sscanf(s, "%s", &Host) != 1 ) { error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source()); free(s); return -1; } if (cfg_number(section, "Port", 1000, 0, 65535, &Port) < 0) return -1; s = cfg_get(section, "Size", NULL); if (s == NULL || *s == '\0') { error("%s: no '%s.Size' entry from %s", Name, section, cfg_source()); return -1; } if (sscanf(s, "%dx%d", &cols, &rows) != 2 || rows < 1 || cols < 1) { error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source()); free(s); return -1; } DROWS = rows; DCOLS = cols; /* open communication with the display */ if (drv_EFN_open(section) < 0) { return -1; } /* initialize display */ drv_EFN_clear(); /* clear display */ return 0; } /****************************************/ /*** plugins ***/ /****************************************/ /****************************************/ /*** widget callbacks ***/ /****************************************/ /* using drv_generic_text_draw(W) */ /* using drv_generic_text_icon_draw(W) */ /* using drv_generic_text_bar_draw(W) */ /* using drv_generic_gpio_draw(W) */ /****************************************/ /*** exported functions ***/ /****************************************/ /* list models */ int drv_EFN_list(void) { printf("EFN LED modules + EUG100 Ethernet to serial convertor"); return 0; } /* initialize driver & display */ /* use this function for a text display */ int drv_EFN_init(const char *section, const int quiet) { WIDGET_CLASS wc; int ret; info("%s: %s", Name, "$Rev: 773 $"); /* display preferences */ // XRES = 5; /* pixel width of one char */ // YRES = 8; /* pixel height of one char */ /* real worker functions */ drv_generic_text_real_write = drv_EFN_write; drv_generic_text_real_defchar = drv_EFN_defchar; /* start display */ if ((ret = drv_EFN_start(section)) != 0) return ret; if (!quiet) { char buffer[40]; qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); if (drv_generic_text_greet(buffer, "www.bwct.de")) { sleep(3); drv_EFN_clear(); } } /* initialize generic text driver */ if ((ret = drv_generic_text_init(section, Name)) != 0) return ret; /* initialize generic icon driver */ if ((ret = drv_generic_text_icon_init()) != 0) return ret; /* initialize generic bar driver */ if ((ret = drv_generic_text_bar_init(0)) != 0) return ret; /* add fixed chars to the bar driver */ drv_generic_text_bar_add_segment(0, 0, 255, 32); /* ASCII 32 = blank */ /* initialize generic GPIO driver */ /* register text widget */ wc = Widget_Text; wc.draw = drv_generic_text_draw; widget_register(&wc); /* register icon widget */ /* wc = Widget_Icon; wc.draw = drv_generic_text_icon_draw; widget_register(&wc); */ /* register bar widget */ /* wc = Widget_Bar; wc.draw = drv_generic_text_bar_draw; widget_register(&wc); */ return 0; } /* close driver & display */ /* use this function for a text display */ int drv_EFN_quit(const int quiet) { info("%s: shutting down.", Name); drv_generic_text_quit(); /* clear display */ drv_EFN_clear(); /* say goodbye... */ if (!quiet) { drv_generic_text_greet("goodbye!", NULL); } debug("closing connection"); drv_EFN_close(); return (0); } /* close driver & display */ /* use this one for a text display */ DRIVER drv_EFN = { .name = Name, .list = drv_EFN_list, .init = drv_EFN_init, .quit = drv_EFN_quit, }; |
From: Martin Z. <co...@mz...> - 2010-11-28 18:12:56
|
Hello everybody! I finally had the time to beautify, streamline and fully comment both the timer and timer group code. It's been quite a bit of work, but I can only encourage everyone to do it. Commenting your code will not only enable others to help fixing bugs much more efficiently because the code is much easier to understand. On "re-thinking" the code I and others wrote, I have also found three to four would-be problems or even bugs per C file. That being said, here come the two things in "timer.c" I didn't want to change without asking in advance. First, I think that CLOCK_SKEW_DETECT_TIME_IN_S should be set to a much higher value: /* delay in seconds between timer events that is considered as being induced by clock skew */ #define CLOCK_SKEW_DETECT_TIME_IN_S 1 Imagine you only have timers that trigger every two seconds (think of a rather slow processor and/or LCD with data that rarely change). Right now, the timers always trigger immediately instead of every two seconds because the code assumes the delay (two seconds) is being caused by clock skew instead of the timer. Of course, increasing CLOCK_SKEW_DETECT_TIME_IN_S won't get rid of the problem completely. But it will lower the chances that a user will stumble upon the "clock skew problem" (which might be totally obscure to him or her). I propose a value of 61 seconds (just above one minute). This should be a sane value that is able to efficiently spot clock skew while not needlessly constraining the users' freedom. :) But I'm open to comments -- that's why I'm writing all this. The other "thing" seems like a real bug to me (and is of course related to clock skew). In case a clock skew has been detected, the next upcoming timer (and *only* that) is updated to the new time. Now imagine two timers of different intervals and a clock skew of one hour (think of the transitions between summer and winter time). The next upcoming timer (let's say number 1) is updated and triggers on. But what about the second? If I get that right, it will not trigger for at least a whole hour while the user awes in wonder! So I think we should update *all* timers: for (timer = 0; timer < nTimers; timer++) Timers[timer].when = now; instead of only the next upcoming one: Timers[next_timer].when = now; Again, I'm open for discussion. Maybe I even got something wrong as I tried to bend my brain around the PROBLEM OF TIME -- me not being a philosopher... :) Have a nice Sunday, Martin -- www.mzuther.de www.radix-musik.de |
From: Jar <ja...@pc...> - 2010-09-18 16:08:52
|
Hello, - Fixed one typo. - Usage info removed from the source, beacuse it is now in wiki. -- Best Regards, Jar |
From: Matt J. <mat...@gm...> - 2010-09-10 14:57:15
|
Hi, I've added support for the Sure DE-LD023. It had a init string which needed sending once the device was switched on. Regards 61c61 < static char dispBuffer[2][16]; --- > static char dispBuffer[4][20]; 103a104 > {0x41, "DE-LD023", 4, 20, 0, 0, 4}, /* Sure electronics USB LCD board Rev.III */ 116c117 < if (Models[Model].protocol == 3) { // Sure electronics USB LCD board - full line output --- > if (Protocol == 3 || Protocol == 4 ) { // Sure electronics USB LCD board - full line output 121c122 < drv_generic_serial_write(dispBuffer[row], 16); --- > drv_generic_serial_write(dispBuffer[row], DCOLS ); 145,146c146,149 < for (i = 0; i < 2; i++) { < for (j = 0; j < 16; j++) { --- > case 4: > /* Sure electronics USB LCD board - clear buffer */ > for (i = 0; i < DROWS; i++) { > for (j = 0; j < DCOLS ; j++) { 148a152 > drv_MO_write(1, i+1, dispBuffer[i], DCOLS); 151,153d154 < drv_MO_write(1, 1, dispBuffer[0], 16); < drv_MO_write(1, 2, dispBuffer[1], 16); < 162c163 < char cmd[11] = "\376N"; --- > char cmd[11] = "\376N"; // 0x4E 175c176 < char cmd[3] = "\376Pn"; --- > char cmd[3] = "\376Pn"; // 0x50 212c213 < drv_generic_serial_write("\376F", 2); --- > drv_generic_serial_write("\376F", 2); 213a215,217 > if(Protocol==4){ > cmd[1]=0x98; > } 330,334c334,349 < if (Models[i].protocol == 3) { // Sure electronics USB LCD board - full line output < int i, j; < for (i = 0; i < 2; i++) { // Clear buffer < for (j = 0; j < 16; j++) { < dispBuffer[i][j] = ' '; --- > /* initialize global variables */ > DROWS = Models[Model].rows; > DCOLS = Models[Model].cols; > GPIS = Models[Model].gpis; > GPOS = Models[Model].gpos; > Protocol = Models[Model].protocol; > > > > > > if (Protocol == 3 || Protocol == 4) { // Sure electronics USB LCD board - full line output > int c, r; > for (r = 0; r < DROWS; r++) { // Clear buffer > for (c = 0; c < DCOLS; c++) { > dispBuffer[r][c] = ' '; 342c357 < if (Model == -1 || Models[Model].protocol > 1) { --- > if (Model == -1 || Protocol > 1) { 369,374d383 < /* initialize global variables */ < DROWS = Models[Model].rows; < DCOLS = Models[Model].cols; < GPIS = Models[Model].gpis; < GPOS = Models[Model].gpos; < Protocol = Models[Model].protocol; 391a401,410 > char cmd[5]; > if (Protocol == 4) { > /* send init string */ > cmd[0] = '\376'; > cmd[1] = 'S'; > cmd[2] = 'u'; > cmd[3] = 'r'; > cmd[4] = 'e'; > drv_generic_serial_write(cmd, 5); > } -- http://www.lostplot.com |
From: Michael R. <mi...@re...> - 2010-07-13 03:27:05
|
Hi Mikhail, > This is small enhancement for MatrixOrbital driver which allows to control Sure Electronics's > 1602 LCD Display Board with USB > (http://www.sureelectronics.net/goods.php?id=885) > > The most funny is: LCD's connected to that USB board can be HD44780-compatible (it seems > USB board converts MatrixOrbital protocol to HD44780) > > Thanks > Mikhail Thanks for your contribution! Just committed (with some cosmetical changes). Could you please add some Documentation to the Wiki? bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Mikhail <any...@ma...> - 2010-07-12 10:31:12
|
Seems mailing list can's show attachments. So, dup it in a plain test here. *** drv_MatrixOrbital.c.old 2010-07-12 09:34:57.000000000 +0400 --- drv_MatrixOrbital.c 2010-07-12 09:42:49.000000000 +0400 *************** *** 58,63 **** --- 58,65 ---- static int Model; static int Protocol; + static char dispBuffer[2][16]; + typedef struct { int type; char *name; *************** *** 98,103 **** --- 100,106 ---- {0x36, "LK202-24-USB", 2, 20, 8, 8, 2}, {0x38, "LK204-24-USB", 4, 20, 8, 8, 2}, {0x39, "VK204-24-USB", 4, 20, 8, 8, 2}, + {0x40, "DE-LD011", 2, 16, 0, 0, 3}, // Sure electronics USB LCD board Rev.I {0xff, "Unknown", -1, -1, 0, 0, 0} }; *************** *** 106,113 **** --- 109,141 ---- /*** hardware dependant functions ***/ /****************************************/ + + static void drv_MO_write(const int row, const int col, const char *data, const int len) + { + char cmd[5] = "\376Gyx"; + + cmd[3] = (char) row + 1; + + if (Models[Model].protocol == 3) { // Sure electronics USB LCD board - full line output + cmd[2] = (char) 1; + drv_generic_serial_write(cmd, 4); + + strncpy(&(dispBuffer[row][col]),data,len); + + drv_generic_serial_write(dispBuffer[row], 16); + } else { + cmd[2] = (char) col + 1; + drv_generic_serial_write(cmd, 4); + + drv_generic_serial_write(data, len); + } + } + + static void drv_MO_clear(void) { + int i,j; + switch (Protocol) { case 1: drv_generic_serial_write("\014", 1); /* Clear Screen */ *************** *** 115,133 **** case 2: drv_generic_serial_write("\376\130", 2); /* Clear Screen */ break; ! } ! } ! ! ! static void drv_MO_write(const int row, const int col, const char *data, const int len) ! { ! char cmd[5] = "\376Gyx"; ! ! cmd[2] = (char) col + 1; ! cmd[3] = (char) row + 1; ! drv_generic_serial_write(cmd, 4); ! drv_generic_serial_write(data, len); } --- 143,162 ---- case 2: drv_generic_serial_write("\376\130", 2); /* Clear Screen */ break; ! ! case 3: ! ! for (i=0;i<2;i++) { // Sure electronics USB LCD board - clear buffer ! for (j=0;j<16;j++) { ! dispBuffer[i][j] = ' '; ! } ! } ! ! drv_MO_write(1,1,dispBuffer[0],16); ! drv_MO_write(1,2,dispBuffer[1],16); ! break; ! } } *************** *** 301,313 **** info("%s: no '%s.Model' entry from %s, auto-dedecting", Name, section, cfg_source()); Model = -1; } ! if (drv_generic_serial_open(section, Name, 0) < 0) return -1; if (Model == -1 || Models[Model].protocol > 1) { /* read module type */ drv_generic_serial_write("\3767", 2); usleep(1000); if (drv_generic_serial_read(buffer, 1) == 1) { --- 330,351 ---- info("%s: no '%s.Model' entry from %s, auto-dedecting", Name, section, cfg_source()); Model = -1; } ! ! if (Models[i].protocol == 3) { // Sure electronics USB LCD board - full line output ! int i,j; ! for (i=0;i<2;i++) { // Clear buffer ! for (j=0;j<16;j++) { ! dispBuffer[i][j] = ' '; ! } ! } ! } if (drv_generic_serial_open(section, Name, 0) < 0) return -1; if (Model == -1 || Models[Model].protocol > 1) { /* read module type */ + drv_generic_serial_write("\3767", 2); usleep(1000); if (drv_generic_serial_read(buffer, 1) == 1) { *************** *** 543,554 **** --- 581,596 ---- /* clear display */ drv_MO_clear(); + + usleep(300000); /* say goodbye... */ if (!quiet) { drv_generic_text_greet("goodbye!", NULL); } + usleep(300000); + drv_generic_serial_close(); return (0); Thanks Mikhail |
From: Mikhail <any...@ma...> - 2010-07-12 05:54:25
|
Hi, This is small enhancement for MatrixOrbital driver which allows to control Sure Electronics's 1602 LCD Display Board with USB (http://www.sureelectronics.net/goods.php?id=885) The most funny is: LCD's connected to that USB board can be HD44780-compatible (it seems USB board converts MatrixOrbital protocol to HD44780) Thanks Mikhail |
From: Michael R. <mi...@re...> - 2010-06-21 02:13:08
|
Hi Henrik, Am 2010-06-20 16:14, schrieb Henrik Schondorff: > Hi lcd4linux developers, > > I have added a new driver (drv_ASTUSB.c) for an simple usb lcd > interface to the lcd4linux source. > The driver is for this low cost interface based only on an Atmel Attiny2313: > http://ast.m-faq.de/USB-LCD/USB-LCD.htm > > At the moment the driver only works for HD44780 compatible Displays with > 1 Controller. > Its only tested with an 20x4 Display but should also work with other > common sizes. > > Would you like to add this driver to your svn? thanks for your contribution! Patch has been checked in. Could you please add some documentation to the wiki? bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Michael R. <mi...@re...> - 2010-06-21 02:09:09
|
Hi Claas, Am 2010-03-16 18:47, schrieb Claas Hilbrecht: > Hello, > > attached you will find a driver for the Allnet FW8888 display. The driver supports only display out no button inputs. Since I didn't have the hardware any more I can add support for the buttons. > > Thanks for LCD4Linux :) > sorry, somehow I lost your mail.... anyway, thanks for your patch, which has just been committed. Would you please add some documentation to the wiki? bye, Michael -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |
From: Claas H. <ba...@fl...> - 2010-03-16 18:25:01
|
Hello, attached you will find a driver for the Allnet FW8888 display. The driver supports only display out no button inputs. Since I didn't have the hardware any more I can add support for the buttons. Thanks for LCD4Linux :) -- Claas Hilbrecht http://www.jucs-kramkiste.de |
From: Michael R. <mi...@re...> - 2010-02-23 03:28:29
|
Hi Jar, > While testing this again with e220, I noticed that the e220 was broken. > While the newer huawei 3G modems accept several at commands at one line > like "ATE1;^CURC=0;^DSFLOWCLR" the e220 does not. If I use "ATE1 > ^CURC=0;^DSFLOWCLR" instead (first semicolon replaced by space) both > e220 and e160 worked. > > Could you or someone else who has some extra time to apply this patch? Applied and checked in. Sorry for the delay, I have been (and am still) ill. Thanks for your contribution! -- Michael Reinelt <mi...@re...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |