
Software avanzado de remapeo de Wiimote
[!IMPORTANT] Este software requiere un controlador de kernel de Wiimote actualizado/corregido, disponible aquí.
Tras la instalación, ejecuta
sudo sed -i '/ATTR{inhibited}="1"/s/^/#/' /etc/udev/rules.d/99-wiimote.rulespara desinhibir los eventos de IR y acelerómetro.
Basado en el sistema de entrada esperto, esperto-wiimote es un mapeador avanzado de Wiimote. Incluye calibración precisa del acelerómetro, buen seguimiento de IR y potentes opciones de remapeo, con soporte de combos. Añade prácticamente cero latencia, dominada en su mayoría por la propia API evdev/uinput del kernel.
Este programa incluye un port++ del algoritmo de seguimiento de IR de 2 puntos de Hector Martin, incluido como referencia.
Disponible en crates.io.
El archivo de configuración se especifica con --config <FILE>. Si no se especifica, el programa cargará una configuración predeterminada integrada de control remoto multimedia disponible en src/default.yaml.
Aquí tienes un ejemplo de configuración con descripciones:
# 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
La lista completa de teclas de Wiimote disponibles es:
ABUpDownLeftRightPlusMinusHomeBtn1Btn2Y ejes:
IRAbsXIRAbsYLa lista completa de códigos de salida disponibles se encuentra aquí. En caso de que un nombre de scancode no sea reconocido, el id numérico seguirá funcionando.
Se puede iniciar un asistente de calibración del acelerómetro ejecutando esperto-wiimote calibration.
Deberás colocar el Wiimote sobre sus 6 lados cuando se te indique y esperar a que la herramienta recopile suficientes lecturas. El resultado se añadirá al archivo de configuración (si se proporciona); de lo contrario, se imprimirá en pantalla. Se pueden proporcionar algunas opciones avanzadas como argumentos si es necesario.
Recomendamos encarecidamente calibrar tu Wiimote antes de usar este programa; de lo contrario, el acelerómetro podría ser bastante poco fiable. Es mejor calibrar después de que el mando haya alcanzado su temperatura normal de funcionamiento. Recuerda que las lecturas del sensor se desviarán ligeramente con el tiempo y con los cambios de temperatura, pero probablemente no será necesario recalibrar, ya que el software compensa la desviación.