From: Scott F. <sc...@st...> - 2009-06-20 23:14:15
|
I hope you don't mind. I've rewritten parts of LCD4Linux in Python to use in my own LCD controller based on gobject and pygtk for a gui. I've used the widget design, the evaluator, some plugins (I'll be using most probably), text widget, layouts design, animated icons, and likely other properties. I've included the following widgets: text, bar (not split, but has hollow option), histogram, gif animation, big numbers, keypad, timer, and icon. My goal's to create a GUI designer that saves in either a Config Object file (pyLCDControl's config system) or a LCD4Linux config file. I'm not looking to support the full gamut of LCDs. My main focus was Crystalfontz displays and picoLCD 256x64 graphic display as that's what I own. I also want to buy one of the 4D OLED displays and play with that as well. Now you're probably wondering why I didn't just use LCD4linux. Well, I tried it and found it a nightmare to program with due to the bars code. I find that special characters are fundamental to the enjoyment a character display can offer. I feel one must offer as much freedom over these special characters through widgets as possible. I've actually discovered that I relied too hard on the special characters so that when it comes to graphics displays I'll have to write in special code for big numbers and gif animations, either that or give every graphics display a large amount of virtual special characters to use, but the problem with that is you lose any colors in an image file like in pyLCDControl's gif widget. It basically draws a pixel on the special character for any non-zero, non-background, non-transparency image pixel. I want to bring some of these widgets over to LCD4Linux, like the big numbers and gif animations. I wrote the number fonts so they're a little ugly, but they're passable, and I'm releasing them under GNU2 with pyLCDControl so feel free to include them with LCD4Linux. Let me know if this all sounds interesting and I'll start working on it. These two widgets don't work on all displays as some displays have gaps between character cells, so they look a little funny. I didn't know how you would feel about that, but I figured I'd mention it up front. Anyhow, if you want to review exactly what I've rewritten for use in pyLCDControl, here's a link to the code. Be warned that not all of the Crystalfontz code has been tested. I have two CFA635's, one with SCAB, so that's all I've tested. Check out the config file (config.ini) to see where I've headed with this. There's an X11 driver configured, and you can navigate the layouts via the buttons on the side of the gtk window. Comment out lines with # if those displays cause problems. Dependencies are gobject, pygtk, config object ( http://www.voidspace.org.uk/python/configobj.html), and I think that's it. Should work with Python 2.5 and up. I haven't tested on anything lower. http://www.starlon.net/files/pyLCDControl.1.tar.gz<http://www.starlon.net/pyLCDControl.php> |