Es/Joystick: Difference between revisions

Jump to navigation Jump to search
Line 64: Line 64:
Los Ejes y el numero de botones pueden ser identificados usando js demo como sigue. Observando el mensaje de salida de js demo al trabajar con ejes y botones puedes determinar que ejes y que botones son los asignados a cada palanca de mando. Esto deberia notarse por numeros que por lo general empiezan en cero.  
Los Ejes y el numero de botones pueden ser identificados usando js demo como sigue. Observando el mensaje de salida de js demo al trabajar con ejes y botones puedes determinar que ejes y que botones son los asignados a cada palanca de mando. Esto deberia notarse por numeros que por lo general empiezan en cero.  


Los botones son manipulados internamente como numeros binarios en los cuales el bit 0 (el menor bit significante) representa el botón 0, el bit 1 representa el botón 1, etc., pero este numero es visualizado en pantalla con notación hexadecimal, así:  
Los botones son najejados internamente como numeros binarios en los cuales el bit 0 (el menor bit significante) representa el botón 0, el bit 1 representa el botón 1, etc., pero este numero es visualizado en pantalla con notación hexadecimal, así:  


* 0001 ⇒ button 0 pressed  
* 0001 ⇒ button 0 pressed  
Line 79: Line 79:
* ... etc.  
* ... etc.  


For Linux users, there is another option for identifying the “name” and the numbers assigned to each axis and button. Most Linux distributions include a very handy program, “jstest”. With a CH Product Yoke plugged into the system, the following output lines are displayed by jstest:  
Para usuario de GNU/Linux, hay otra opción para identificar el “nombre” y los numeros asignados a cada eje y botón. La mayoria de las distribuciones GNU/Linux incluyen un programa muy manejable, “jstest”. Con unos cuernos de control de CH Product conectados al sistema, las siguientes lineas son mostradas por jstest:  


  jstest /dev/js3  
  jstest /dev/js3  
Line 86: Line 86:
  Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off  
  Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off  


Note the “name” between parentheses. This is the name the system associates with your joystick.  
Notese el “nombre” entre parentesis. Este es el nombre que el sistema asocia a tu palanca de control.  


When you move any control, the numbers change after the axis number corresponding to that moving control and when you depress any button, the “off” after the button number corresponding to the button pressed changes to “on”. In this way, you can quickly write down the axes numbers and button numbers for each function without messing with binary.
Cuando mueves algun control, los numeros cambian después de pulsar cualquier boton o mover el control correspondiente, el “off” cambia a “on” después de pulsar el botón correspondiente. De esta forma, puedes anotar rápidamente los numeros de eje y de botón para cada función sin liarte con el binario.


===Writing or editing joystick binding xml files===
===Writing or editing joystick binding xml files===
5,810

edits

Navigation menu