Page 1 sur 1

Palonnier sur t16000 HOTAS

Publié : mar. janv. 01, 2019 2:10 pm
par maxpeigne
Bonjour à tous,

Je me lance dans la configuration de mon T16000 HOTAS via TARGET Script editor pour utiliser sous DCS.
L'ensemble fonctionne bien, mais je n'arrive pas a avoir accès à la commande "palonnier" derriere le throttle (tous les autres axes fonctionnent).
Je vous joins mon script, auriez vous une idée du problème?

Merci

Code : Tout sélectionner

include "target.tmh" include "DCS_M2000_Internal.tmh"; //program startup int main() { if(Init(&EventHandle)) return 1; // declare the event handler, return on error //add initialization code here SetKBLayout(KB_FR); //Initialisation des boutons et axes initResetStick(); // ****************************************************************** // **************************** JOYSTICK **************************** // ****************************************************************** //Mappage des touches joystick manche MapKey(&T16000, TS1, '7'); //Gachette MapKey(&T16000, TS2, SPC); //BP bas MapKey(&T16000, TS3, 'c'); //BP gauche MapKey(&T16000, TS4, TEMPO('b', 'w',500)); //BP droit MapKey(&T16000, H1U, 'm'); //Chapeau chinois haut MapKey(&T16000, H1L, ';'); //Chapeau chinois gauche MapKey(&T16000, H1R, '!'); //Chapeau chinois droit MapKey(&T16000, H1D, ':'); //Chapeau chinois bas //Mappage des touches joystick gauche MapKey(&T16000, B5, R_CTL+INS); //Haut gauche MapKey(&T16000, B6, R_CTL+INS); //Haut centre MapKey(&T16000, B7, R_CTL+INS); //Haut droit MapKey(&T16000, B8, L_CTL+'"'); //Bas droit MapKey(&T16000, B9, L_CTL+USB[0x1F]); //Bas centre MapKey(&T16000, B10, L_CTL+'&'); //Bas gauche //Mappage des touches joystick droit MapKey(&T16000, B11, R_CTL+INS); //Haut droit MapKey(&T16000, B12, R_CTL+INS); //Haut centre MapKey(&T16000, B13, R_CTL+INS); //Haut gauche MapKey(&T16000, B14, R_CTL+INS); //Bas gauche MapKey(&T16000, B15, R_CTL+INS); //Bas centre MapKey(&T16000, B16, R_CTL+INS); //Bas droit // ********************************************************************** // **************************** FIN JOYSTICK **************************** // ********************************************************************** // ****************************************************************** // **************************** THROTTLE **************************** // ****************************************************************** MapKey(&TWCSThrottle, TBTN1, TEMPO(ENT, 'u',700)); //BP orange //Mappage bp orange arriere MapKey(&TWCSThrottle, TBTN2, 'o'); //BP orange gauche MapKey(&TWCSThrottle, TBTN3, '$'); //BP orange droit //Mappage commutateur arriere MapKey(&TWCSThrottle, TBTN4, '='); //Commutateur haut MapKey(&TWCSThrottle, TBTN5, ')'); //Commutateur bas //Mappage clic analogique arriere // MapKey(&TWCSThrottle, TBTN6, 'v'); //Clique //Mappage VRAI chapeau chinois haut MapKey(&TWCSThrottle, THAT2U, DX3); //Haut MapKey(&TWCSThrottle, THAT2L, DX1); //Gauche MapKey(&TWCSThrottle, THAT2R, DX2); //Droit MapKey(&TWCSThrottle, THAT2D, 's'); //Bas //Mappage chapeau chinois millieu MapKey(&TWCSThrottle, THAT1U, 'k'); //Haut MapKey(&TWCSThrottle, THAT1R, 'd'); //Fond MapKey(&TWCSThrottle, THAT1D, '4'); //Bas MapKey(&TWCSThrottle, THAT1L, '!'); //Proche //Mappage chapeau chinois bas MapKey(&TWCSThrottle, THAT3U, R_CTL+'z'); //Haut MapKey(&TWCSThrottle, THAT3R, R_CTL+'d'); //Droit MapKey(&TWCSThrottle, THAT3D, R_CTL+'z'); //Bas MapKey(&TWCSThrottle, THAT3L, R_CTL+'s'); //Gauche // ********************************************************************** // **************************** FIN THROTTLE **************************** // ********************************************************************** } //event handler int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); //add event handling code here } //DX utilisés: 1,2,3,

Code : Tout sélectionner

int initResetStick(){ // clear stick buttons MapKey(&T16000, TS1, 0); MapKey(&T16000, TS2, 0); MapKey(&T16000, TS3, 0); MapKey(&T16000, TS4, 0); MapKey(&T16000, H1U, DXHATUP); MapKey(&T16000, H1D, DXHATDOWN); MapKey(&T16000, H1L, DXHATLEFT); MapKey(&T16000, H1R, DXHATRIGHT); MapKey(&T16000, B5, 0); MapKey(&T16000, B6, 0); MapKey(&T16000, B7, 0); MapKey(&T16000, B8, 0); MapKey(&T16000, B9, 0); MapKey(&T16000, B10, 0); MapKey(&T16000, B11, 0); MapKey(&T16000, B12, 0); MapKey(&T16000, B13, 0); MapKey(&T16000, B14, 0); MapKey(&T16000, B15, 0); MapKey(&T16000, B16, 0); // clear throttle buttons MapKey(&TWCSThrottle, TBTN1, 0); MapKey(&TWCSThrottle, TBTN2, 0); MapKey(&TWCSThrottle, TBTN3, 0); MapKey(&TWCSThrottle, TBTN4, 0); MapKey(&TWCSThrottle, TBTN5, 0); MapKey(&TWCSThrottle, THAT1U, 0); MapKey(&TWCSThrottle, THAT1D, 0); MapKey(&TWCSThrottle, THAT1L, 0); MapKey(&TWCSThrottle, THAT1R, 0); MapKey(&TWCSThrottle, THAT2U, 0); MapKey(&TWCSThrottle, THAT2D, 0); MapKey(&TWCSThrottle, THAT2L, 0); MapKey(&TWCSThrottle, THAT2R, 0); MapKey(&TWCSThrottle, THAT3U, 0); MapKey(&TWCSThrottle, THAT3D, 0); MapKey(&TWCSThrottle, THAT3L, 0); MapKey(&TWCSThrottle, THAT3R, 0); SetupDefaultAxis(); } int SetupDefaultAxis(){ MapAxis(&T16000, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, JOYX, 0, 0, 0, 0, 0); MapAxis(&T16000, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, JOYY, 0, 0, 0, 0, 0); MapAxis(&T16000, RUDDER, 0, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, RUDDER, 0, 0, 0, 0, 0); MapAxis(&T16000, THR, 0, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&T16000, THR, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TRDR, 0, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TRDR, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TTHR, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TTHR, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TANT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TANT, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TMSTX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TMSTX, 0, 20, 0, -1, 0); MapAxis(&TWCSThrottle, TMSTY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TMSTY, 0, 20, 0, -1, 0); MapAxis(&TWCSThrottle, TCSRIGHT, 0, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TCSRIGHT, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TCSRUDDER, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TCSRUDDER, 0, 0, 0, 0, 0); MapAxis(&TWCSThrottle, TCSLEFT, 0, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&TWCSThrottle, TCSLEFT, 0, 0, 0, 0, 0); }
Edit: Je viens de m'apercevoir qu'il me manque aussi la rotation en Z du joysticl et le petit slider du joystick...

Re: Palonnier sur t16000 HOTAS

Publié : mar. janv. 01, 2019 2:41 pm
par maxpeigne
C'est toujours peu de temps apres avoir posté que l'on trouve la solution (pourtant ce n'etait pas faute d'avoir cherché)...

Le problème se situait dans le fichier DCS_M2000_Internal.
J'ai remplacé TCSRUDDER par RUDDER

Code : Tout sélectionner

MapAxis(&TWCSThrottle, RUDDER, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
Et pour le petit slider, j'ai remplacé 0 par DX_SLIDER_AXIS

Code : Tout sélectionner

MapAxis(&T16000, THR, DX_SLIDER_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
Voila, si ca peut en aider certains...