LCDproc development and user support list

Text archives Help

[Lcdproc] picoLCD improved key input

Chronological Thread 
  • From: martin.t.jones at (Martin Tharby Jones)
  • Subject: [Lcdproc] picoLCD improved key input
  • Date: Sun, 07 Aug 2011 19:08:01 +0100


I have attached a patch which updates the picoLCD driver to use
libusb-1.0. The advantage of libusb-1.0 is the asynchronous USB access
it provides, this removes the need for the key time-out used in
picoLCD_get_key() which disrupts the main loop timing. Try a screen that
updates frequently such as the lcdproc CPU screen to see the improvement.

I have changed the get key algorithm to implement key auto repeat and
report key events when the key is pressed rather than when it is
released, this is consistent with most key input so what a user expects.

All the changes are conditionally compiled and can be disabled with the
configuration option --disable-libusb-1-0. You will of course need to
have libusb-1.0 installed to use the new code.

I have tested my code on my 20x2 display, the only hardware I have.
Could someone with a 20x4 display confirm that that is OK.

The change to asynchronous USB input also affects the IR data input, I
haven't got a working LIRC configuration yet but my problems are the
same before and after my change. Could anyone with a working LIRC see if
it still works, it should be better, the key reporting is more reliable.

I have put FIXME comments in picoLCD_init(), picoLCD_close() and
do_mainloop() where further work is required by someone who has a good
range of hardware to test on. I do not want to make significant changes
that I am unable to test. The code works as it is but the libusb
initinalization and deinitialization needs to be somewhere common to
enable support of multiple usb devices. The patch in the main loop needs
integrating with the other socket handling.

I hope this is useful to other picoLCD users.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libusb-1.0.patch
Type: text/x-patch
Size: 37327 bytes
Desc: not available

Archive powered by MHonArc 2.6.18.

Top of page