Code review comment for lp:~jeff-licquia/pystromo/saitek

Revision history for this message
Jeff Licquia (jeff-licquia) wrote :

On 11/23/2010 07:48 AM, Raumkraut wrote:
> Review: Needs Information
> Thanks for bringing this to my attention, Jeff.
> It's not going to get merged in though, as the features have been implemented in the wrong places:
> - Parsing config files should be (and is!) done before an InputDevice is instantiated.
> - Saving application-state information shouldn't really be done by the InputDevice either. And it's probably a bad idea to write config data every time an LED changes.
> - Plus some nomenclature issues. :)

OK. I'll refactor and resend. Any hints on the nomenclature issues?

> And I have to ask: why were some buttons renamed to "TRIGGER_HAPPY##", aside from the amusement factor? :)

It's from linux/input.h; here's the commit log for when this came in:

commit cf2f765f1896064e34c6f0f2ef896ff058dd5c06
Author: Jiri Kosina <email address hidden>
Date: Mon Jan 4 12:20:56 2010 +0100

     HID: handle joysticks with large number of buttons

     Current HID code doesn't properly handle HID joysticks which have
     larger number of buttons than what fits into current range reserved
     for BTN_JOYSTICK.

     One such joystick reported to not work properly is Saitek X52 Pro
     Flight System.

     We can't extend the range to fit more buttons in, because of backwards
     compatibility reasons.

     Therefore this patch introduces a new BTN_TRIGGER_HAPPY range, and
     uses these to map the buttons which are over BTN_JOYSTICK limit.

     Acked-by: Dmitry Torokhov <email address hidden> [for the
input.h part]
     Signed-off-by: Jiri Kosina <email address hidden>

« Back to merge proposal