Zoom com o TrackIR no IL2/PF>

Novidades, reclamações e ajuda aqui!!!
Post Reply
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Zoom com o TrackIR no IL2/PF>

Post by 21_Sokol1 »

Bem, como estou com preguiça de traduzir isto (e de usar meu TrackIR), caso alguem queira testar, possibilita dar zoom com o TrackIR no IL2/PF:

===============================================

Bon ben trackIR reçu et la petite astuce est fonctionelle !!!

DONC:

1/ téléchargez ceci :



* PPJOY (http://www.geocities.com/deonvdw/Docs/PPJoyMain.htm)
* Tir2joy (http://www.dikant.de./index.php?option= ... &Itemid=24)

* AUTOHOTKEY (http://www.autohotkey.com/)


2/ Installer PPJOY.

Il va vous permettre de créer un joystick virtuel. Cliquer sur "ADD" et créez-le. Une fois terminé, windows va automatiquement detecter les pilotes et les installer

Maintenant dans le panneau de configuration, ce joystick virtuel doit apparaitre.
On reviendra sur la configuration de ce joystick plus tard...

3/ Extraire tir2joy.exe et tir2joy.ini dans un dossier de votre choix.

4/ Activez votre TRACK IR (en activant la fonction zoom bien-sûr, soit "Y")

5/ Activez Tir2joy

6/ Ouvrir "controleurs de jeu" dans le panneau de configuration. Choisir le joystick virtuel et cliquez sur "propriétés".
Vérifiez que les mouvements de tete font bouger les axes.
Notez l'axe qui apparait comme celui du "Y" du trackIR, soit le mouvement d'avant en arrière.
Calibrez le joystick virtuel maintenant. Ne pas exagérer sur l'amplitude des mouvements !

7/Installer AUTOHOTKEY
Ouvrir un nouveau document texte (avec le notepad) et coller ceci à l'intérieur :


; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <[email protected]>
;
; Script Function:
; Template AutoHotkey script.
;
; TrackIR Zoom Script for IL2FB/AEP/PF
; http://www.lufthunden.com
; This script is used to send single keypresses to manage FOV in IL2.
; =LH=Mave's Xmas present for the IL2 community
#SingleInstance
SetFormat, float, 03 ; Omit decimal point from axis position percentages.
JoystickNumber = 2 ; Increase this to test a joystick other than the first.
JoystickAxis = V ; Set this to the axis you want to use.
GetKeyState, axis_count, %JoystickNumber%JoyAxes
if axis_count < 1
{
MsgBox Joystick #%JoystickNumber% does not appear to be attached to the system.
ExitApp
}
Loop
{
GetKeyState, joystate, %JoystickNumber%Joy%JoystickAxis%
if joystate between 000 and 013
ifNotEqual, sent_button, 1
{
sent_button = 1
Send, +{Numpad0 1}
}
if joystate between 014 and 018
ifNotEqual, sent_button, 2
{
sent_button = 2
Send, +{Numpad9 1}
}
if joystate between 019 and 023
ifNotEqual, sent_button, 3
{
sent_button = 3
Send, +{Numpad8 1}
}
if joystate between 024 and 028
ifNotEqual, sent_button, 4
{
sent_button = 4
Send, +{Numpad7 1}
}
if joystate between 029 and 033
ifNotEqual, sent_button, 5
{
sent_button = 5
Send, +{Numpad6 1}
}
if joystate between 034 and 038
ifNotEqual, sent_button, 6
{
sent_button = 6
Send, +{Numpad5 1}
}
if joystate between 039 and 043
ifNotEqual, sent_button, 7
{
sent_button = 7
Send, +{Numpad4 1}
}
if joystate between 044 and 048
ifNotEqual, sent_button, 8
{
sent_button = 8
Send, +{Numpad3 1}
}
if joystate between 049 and 056
ifNotEqual, sent_button, 9
{
sent_button = 9
Send, +{Numpad2 1}
}
if joystate between 057 and 061
ifNotEqual, sent_button, 10
{
sent_button = 10
Send, +{Numpad1 1}
}
if joystate between 062 and 066
ifNotEqual, sent_button, 11
{
sent_button = 11
Send, +{NumpadMult 1}
}
if joystate between 067 and 071
ifNotEqual, sent_button, 12
{
sent_button = 12
Send, +{NumpadSub 1}
}
if joystate between 072 and 100
ifNotEqual, sent_button, 13
{
sent_button = 13
Send, +{NumpadAdd 1}
}
if joystate between 000 and 023 ;If state "023" or below, enable precision mode
ifNotEqual, precision_mode, 1
{
precision_mode = 1
Send, {F10 down}
}
if joystate between 024 and 100 ;If state "024" or more, disable precision mode
ifNotEqual, precision_mode, 0
{
precision_mode = 0
Send, {F10 up}
}

Sleep, 25
}
return

__________________________________________________ ________________

Sauvegardez ce fichier en l'appelant strictement : PFzoom.ahk
Transformez ce fichier en exécutable avec AUTOHOTKEY
Pour le rendre actif il faudra dorénavant double-cliquer dessus. (attendez avant de le faire)

Bon, maintenant, assurez vous que la touche F10 est bien utilisée comme touche par défaut pour la fonction PRECISION du trackIR.
Si ce n'est pas le cas, trouvez dans le script :

Send, {F10 down}
Send, {F10 up}
remplacez F10 par votre touche attribuée (moi c'est F7 )

Toujours dans le script cherchez aussi la ligne :

JoystickNumber =2 ; Increase this to test a joystick other than first
Vous devrer remplacer 2 par un 3 si votre joystick virtuel est le troisième de la liste.(par 4 s'il est le quatrième etc etc etc...)

Trouvez aussi la ligne suivante :

JostickAxis = V ; Set this to the axis you want to use
Reportez ici la valeur qui est affiliée au zoom dans le joytick virtuel... Oui oui c'est celui que vous avez précédemment noté !
V est une valeur commune mais on peut trouver X, Y, Z et U...


8/ L'heure du test !
Activez le script (un H vert doit apparaitre dans la barre des taches)
Activez le trackIR si c'est pas déja fait
Activez Tir2Joy
Créez un nouveau document texte, placer le curseur de la souris a l'intérieur (comme si vous alliez écrire) et bougez la tete...
Si des valeurs numériques apparaissent c'est presque fini !
Si rien ne s'affiche, vérifiez les étapes précédentes en vérifiant bien l'axe attribué au zoom.


9/ Configurer IL2

C'est au niveau des commandes que ça se passe.
Attribuer ces valeurs en rouge:


Vue large= +
CDV 85= -
CDV 80= *
CDV 75= 1
Vue normale= 2
CDV65= 3
CDV60= 4
CDV55= 5
CDV50= 6
CDV45= 7
CDV40= 8
CDV35= 9
Vue viseur= Insert


Attention : CE SONT LES VALEURS DU PAVE NUMERIQUE !!!
SUPPRIMER TOUTE FONCTION QUI FAIT APPEL A CES TOUCHES meme AVEC le préfixe Ctrl, Alt ou Maj...
__________________________________________________ _______________

Et voila ! Bon courage !

Ca devrait fonctionner.

Ca fonctionne chez moi mais j'ai un peu de mal avec la calibration du joystick virtuel !

Bon vol !

=============================================

Sokol1
20_Kyrodus

Post by 20_Kyrodus »

S!

Assim que eu comprei o TrackIR eu tentei fazer isso. Existe um post em inglês ou espanhol em algum lugar da net, se não me engano.

Mas achei muito complicado... Prefiro usar o Hat Switch do joy pra dar o zoom agora... pra mim funciona mais do que bem.

No entanto fica aí uma boa dica praqueles que quiserem se aventurar.

SP!
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Post by 21_Sokol1 »

Post Reply