From: Michael D. <mi...@mi...> - 2006-11-28 16:53:05
|
Hi, Sorry just discovered that I missed one line out of the diff. Once you've applied the patch you need to modify plugin_file.c and add... #include <errno.h> after the #include<string.h> line. Mike On 11/28/06, Michael Ditum <mi...@mi...> wrote: > > Hi, > > Now that I've got lcd4linux to output some text on my CrystalFontz 635 > I've had some time to play with the system. I've come across a couple of > issues. > > The first was that whenever I press the Cancel button on the keypad it did > nothing. Down, left, right and Confirm all did fine. However when I pressed > Up I got an Up event and a Cancel event raised. After some investigating I > discovered the offending line to be in the drv_CF_keypad function. The code > had Cancel Key Pressed as being 7 when page 14 of CrystalFontz data sheet > says its 6. Having looked a bit more in depth at this it look like the > released events were never converted correctly either as they were 1 out. > The patch attached fixes this issue. > > The second was some missing functionality. I gather from the wiki there is > currently no way of switching layouts from a key press. Unfortunately I > don't have time to implement that so I've made lcd4linux read from a text > file for the output to display and another program handles updating the > display. To aid in this I added some extra functions to the file plugin... > > file::writeline(string file, string text, int mode) > > This writes the line of text to the specified file. If mode is 0 it > appends the text, if it is 1 it overwrites the file with the text. It > returns a blank string so is only really useful in key handlers. > > file::exec(string command) > > This function runs the command. Unlike exec it runs the command only once > and doesn't return any output text. This makes it useful for controlling the > system from a key handler. > > I've attached a diff that contains these additions and I give you full > permission to incorporate the code in lcd4linux. > > Mike > > |