
Software avanzato di rimappatura per Wiimote
[!IMPORTANT] Questo software richiede un driver del kernel Wiimote aggiornato/corretto, disponibile qui.
Dopo l'installazione, esegui
sudo sed -i '/ATTR{inhibited}="1"/s/^/#/' /etc/udev/rules.d/99-wiimote.rulesper de-inibire gli eventi IR e accelerometro.
Basato sul sistema di input esperto, esperto-wiimote è un mapper avanzato per Wiimote. Offre una calibrazione precisa dell'accelerometro,
un buon tracciamento IR e potenti opzioni di rimappatura, con supporto per combo. Non aggiunge praticamente latenza, dominata principalmente dall'API evdev/uinput del kernel stesso.
Questo programma include una port++ dell'algoritmo di tracciamento IR a 2 punti di Hector Martin, incluso come riferimento.
Disponibile su crates.io.
Il file di configurazione viene specificato con --config <FILE>. Se non specificato,
il programma caricherà un predefinito built-in per telecomando multimediale disponibile su src/default.yaml.
Ecco un esempio di configurazione con descrizioni:
# 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
L'elenco completo dei tasti Wiimote disponibili è:
ABUpDownLeftRightPlusMinusHomeBtn1Btn2E assi:
IRAbsXIRAbsYL'elenco completo dei codici di output disponibili si trova qui. Nel caso in cui un nome di scancode non venga riconosciuto, l'ID numerico funzionerà comunque.
È possibile avviare una procedura guidata di calibrazione dell'accelerometro eseguendo esperto-wiimote calibration.
Dovrai posizionare il Wiimote sui suoi 6 lati come richiesto, e attendere che lo strumento raccolga abbastanza letture. L'output verrà aggiunto al file di configurazione (se fornito), altrimenti stampato a schermo. Alcuni override avanzati possono essere forniti come argomenti se necessario.
Raccomandiamo vivamente di calibrare il tuo Wiimote prima di utilizzare questo programma, altrimenti l'accelerometro potrebbe essere piuttosto inaffidabile. È meglio calibrare dopo che il telecomando ha raggiunto la sua temperatura operativa normale. Ricorda che le letture del sensore deriveranno leggermente nel tempo e con variazioni di temperatura, ma probabilmente non sarà necessaria una ricalibrazione, poiché il software tiene conto della deriva.