LCDproc development and user support list

Text archives Help


[Lcdproc] Patch for lcd2usb


Chronological Thread 
  • From: bsdfan at nurfuerspam.de (Markus Dolze)
  • Subject: [Lcdproc] Patch for lcd2usb
  • Date: Tue, 21 Dec 2010 08:05:46 +0100

On 18.12.2010 17:42, Michael Zanetti wrote:
> Hi,
>
> The attached patch for hd44780-lcd2usb changes the device scanning
> mechanism
> of the lcd2usb driver. The original version scans for all attached lcd2usb
> devices and uses the last one found. This has the problem, that defining
> two
> lines "Driver=hd4478" in the config file, opens the last display twice.
>
> The patched version keeps track of the used devices and uses the first
> unused
> one. This makes it possible to use multiple lcd2usb devices on one machine
> and
> clone the output to all of them (e.g. for different rooms playing music
> using
> the same MythTV box).
>
> Thanks for making LCDproc!
> Michael
>

Hello Michael,

I will not add this patch. For several reasons:

* I'd like to see code reuse. We have a linked list implementation
available as ./shared/LL.c .
* It adds a global variable to the hd44780 driver which is supposed
to not have these. The lcd2usb driver has a global buffer anyway.
This was accidentally commited and will be corrected soon.
* The global variable introduces a dependency between otherwise
unrelated instances of hd44780 drivers.
* It only addresses the situation where you have the same number of
driver instances as the number of devices connected. If one only
uses some of his devices it depends on libusb which devices are used.

One solution will be to add a unique device address to the connection
type, e.g. the USB serial number, like the bwct connection type supports
and then add a config section for each device. Unfortunately stock USB
devices do not have a serial number. It can easily be added, but
requires firmware modification for each device.

Regards,
Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20101221/af50e956/attachment.htm>




Archive powered by MHonArc 2.6.18.

Top of page