
高度なWiimoteリマッピングソフトウェア
[!IMPORTANT] このソフトウェアは、こちらにある更新/修正済みのWiimoteカーネルドライバが必要です。
インストール後、
sudo sed -i '/ATTR{inhibited}="1"/s/^/#/' /etc/udev/rules.d/99-wiimote.rulesを実行して、IRおよび加速度計イベントの抑制を解除してください。
esperto入力システムをベースにしたesperto-wiimoteは、高度なWiimoteマッパーです。高精度な加速度計キャリブレーション、優れたIRトラッキング、そしてコンボ対応の強力なリマッピングオプションを備えています。レイテンシは実質的にゼロで、そのほとんどはカーネルのevdev/uinput API自体によって支配されています。
このプログラムは、Hector Martinの2点IRトラッキングアルゴリズムのport++を搭載しており、こちらにリファレンスとしてバンドルされています。
crates.ioで入手可能です。
設定ファイルは--config <FILE>で指定します。指定しない場合、プログラムはsrc/default.yamlにある組み込みのメディアリモコンデフォルトを読み込みます。
以下は説明付きの設定例です:
# Whether to grab the devices, so other software won't use them
grab: false
# Command to run when the first Wiimote connects, as list of arguments
# Useful for automation like powering on the sensor bar
on_connect: [ "echo", "hello", "world" ]
# Command to run when thelast Wiimote disconnected, as list of arguments
# Useful for automation like powering off the sensor bar
on_disconnect: [ "echo", "goodbye", "world" ]
# Options for the output device slot. For each Wiimote there are four available slots, from `slot1` to `slot4`.
# Slots are useful to isolate mouse/keyboard/joysticks inputs
slots:
slot1:
# Name of the wirtual device
name: "Esperto Wiimote mouse"
slot2:
name: "Esperto Wiimote keyboard"
# Whether the device should autorepeat held keys, this might get overruled by the compositor
repeating: true
# Accelerometer calibration data generated with the `esperto-wiimote calibration` command
accelerometer_calibration: [
1.0014056, -0.011690015, 0.009826779,
-0.02909683, 1.013545, 0.005751312,
-0.010004735, -0.012316463, 0.99458194,
28.481918, 33.827446, 30.468597 ]
# Margins of the mapped area. True margins are 0-4095 (regardless of screen resolution), but you will
# want to exceed those to account for the aspect ratio, and the IR sensor not reaching all the way to the margins.
# The same scaling will be applied to all axes
screen_limits:
north: -2000
south: 6569
west: -300
east: 4395
# Center an axis when it gets enabled
centering:
# Axes can be specified by name...
!Axis ABS_X: 2048
# Or by their real integer id
!CustomAxis 1: 2048
# Park an axis when it gets disabled
parking:
!CustomAxis 0: 4095
!Axis ABS_Y: 4095
# The physical dimensions of your sensorbar
sensor_bar:
width: 19.5
cluster_width: 4.5
cluster_height: 1.0
pixel_width: 256.0
# The smoothing parameters can be tuned
smoothing:
radius: 30.0
speed: 0.15
deadzone: 8.0
# esperto combos configuration, check https://github.com/KayJay7/esperto for more information
esperto:
modifiers:
- name: pointer
keys: [ B ]
actions:
- key: A
action:
# Actions must specify their output slot
slot: Slot2
# Keys can be specified by name...
code: !Key KEY_SPACE
modified:
- modifier: pointer
action:
slot: Slot1
# Or by their integer id
code: !CustomKey 0x110
利用可能なWiimoteキーの完全なリストは以下の通りです:
ABUpDownLeftRightPlusMinusHomeBtn1Btn2そして軸:
IRAbsXIRAbsY利用可能な出力コードの完全なリストはこちらにあります。スキャンコード名が認識されない場合でも、数値IDは機能します。
esperto-wiimote calibrationを実行することで、加速度計のキャリブレーションウィザードを開始できます。
プロンプトに従ってWiimoteを6面に置き、ツールが十分な読み取りを収集するのを待つ必要があります。出力は(指定されている場合)設定ファイルに追加され、それ以外の場合は画面に表示されます。必要に応じて、いくつかの高度なオーバーライドを引数として指定することもできます。
このプログラムを使用する前にWiimoteのキャリブレーションを行うことを強くお勧めします。そうしないと、加速度計がかなり信頼性の低いものになる可能性があります。リモコンが通常の動作温度に達した後にキャリブレーションすることをお勧めします。センサーの読み取り値は時間の経過と温度変化とともにわずかにドリフトすることに注意してください。ただし、ソフトウェアがドリフトを考慮しているため、再キャリブレーションはおそらく必要ありません。