From: Marcus B. <mar...@in...> - 2009-04-02 02:11:41
|
Hi, I've recently been playing with lcd4linux on an HD44780-compatible 16x2 DFSTN display (JHD162A), and was interested in the 'layer' attribute. It appears that this functionality hasn't yet been done for generic text displays (HD44780 inc.) so I've attached some patches+info. Please excuse any crudeness/CodingStyle issues (hopefully my method of generating the patches is sufficient + works!). A compressed xvid avi has been included for illustration, and sample conf to see how it's done. layer_patch: If an icon is marked as invisible, we look for a character in an underlying widget. I should really have added a visibility check for that layer as well... oops! I'd like to attack true transparency at some stage but I suspect that would involve bitmapping some|all of the device's character set. I imagine that a transparent pixel could be represented with "_" in the bitmap, as opposed to blank ('.'). frame_patch: I started with a flashing email icon (left+right), but decided an animated (sliding) one would be nicer to look at. Running two (independent) animated icons proved to be problematic as they occasionally get out of sync. The frame_patch addresses this issue by giving the user the ability to specify the bitmap frame to be shown by evaluated formula. Note I should have added a cellgap feature to either the bitmap or evaluated formula to prevent "stretching", and that the animations are 2x longer than necessary as the formula (test::bar) counts up and back... but you get the point ;). OT notes: + I note that icon's are not tested for "full" (block = chr 255) or "empty" (space). Adding a test for this would free up 2 user chars, right? Or is this just a waste of time/effort? + any plans for an imap plugin, or should I try that too? ;) Hope this is of use, advice appreciated, Regards, Marcus. |