1. 30 10月, 2013 1 次提交
    • D
      HID: wiimote: add pro-controller analog stick calibration · 08072dde
      David Herrmann 提交于
      The analog sticks of the pro-controller might report slightly off values.
      To guarantee a uniform setup, we now calibrate analog-stick values during
      pro-controller setup.
      
      Unfortunately, the pro-controller fails during normal EEPROM reads and I
      couldn't figure out whether there are any calibration values stored on the
      device. Therefore, we now use the first values reported by the device (iff
      they are not _way_ off, which would indicate movement) to initialize the
      calibration values. To allow users to change this calibration data, we
      provide a pro_calib sysfs attribute.
      
      We also change the "flat" values so user-space correctly smoothes our
      data. It makes slightly off zero-positions less visible while still
      guaranteeing highly precise movement reports. Note that the pro controller
      reports zero-positions in a quite huge range (at least: -100 to +100).
      Reported-by: NRafael Brune <mail@rbrune.de>
      Tested-by: NRafael Brune <mail@rbrune.de>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      08072dde
  2. 03 6月, 2013 2 次提交
    • D
      HID: wiimote: add "bboard_calib" attribute · 8b1fded7
      David Herrmann 提交于
      Balance-Boards provide 3 16bit calibration values for each of the 4
      sensors. We provide these now as 192bit value via a new "bboard_calib"
      sysfs attribute.
      We also re-read the calibration data from the device whenever user-space
      attempts to read this file. On normal Nintendo boards, this always
      produces the same results, however, on some 3rd party devices these values
      change until the device is fully initialized. As I have currently no idea
      how long to wait until it's ready (sometimes takes up to 10s?) we provide
      a simple workaround for users by reading this file.
      
      If we, at some point, figure out how it works, we can implement it in the
      kernel and provide offline data via "bboard_calib". This won't break
      user-space then.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8b1fded7
    • D
      HID: wiimote: add sysfs extension/device-type attrs · c7da0867
      David Herrmann 提交于
      Two new attributes, "extension" and "devtype" now allow user-space to read
      the extension type and device type. As device detection is asynchronous,
      we send a CHANGED event after it is done. This also allows user-space to
      wait for a device to settle before opening its input event devices.
      
      The "extension" device is compatible with the old "extension" sysfs field
      (which was registered by the static extension support code).
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c7da0867
  3. 23 11月, 2011 1 次提交
  4. 11 7月, 2011 1 次提交