lkml.org 
[lkml]   [2020]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] HID: wiimote: Initialize the controller LEDs with a device ID value
Date
On Thursday, June 25, 2020 3:09:46 AM EDT David Rheinsberg wrote:
> Hi
>
> On Thu, 25 Jun 2020 at 00:09, David Korth <gerbilsoft@gerbilsoft.com> wrote:
> > I've been manually setting the player IDs on Wii controllers when running
> > multiplayer games by writing to the /sys/class/leds/ directory. Having the
> > hid-wiimote driver do this itself significantly reduces setup time.
>
> What do you mean with "reduces setup time significantly"? Why would it
> take that long to set the LEDs?
>
> Thanks
> David

The LED setup in this case is done entirely manually by me writing to the
individual files in /sys/class/leds/. This has to be done when the controllers
are connected initially, and if a controller has to be reconnected for some
reason (e.g. it runs out of batteries). I don't know of any userspace tools
that would make this easier to automate, except maybe a shell script, and I'd
probably still need to run it manually.

Both the Sixaxis and Xpad drivers appear to implement something similar, so
perhaps a higher-level "player number" mechanism that works with all
controllers would be worth looking into. This could in theory be done with a
userspace daemon too (or a udev hook).

As it is right now, I still think implementing it in the wiimote driver is the
best method to keep it consistent with the rest of the drivers without having
to install additional userspace tools.

Thanks


\
 
 \ /
  Last update: 2020-06-26 05:58    [W:1.234 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site