offset cdu

Questions de programmation / Offset FSUIPC et IOCP

offset cdu

Messagede mameloose » Mer 30 Sep 2009 19:14

bonjour a tous

je m'adresse particulièrement au personnes ayant le cdu de project magenta ; j'essaye en vain de trouver les offsets permettant d'assigner les touches du clavier du cdu.

dans la doc pm ils mettent variable 5428 et parlent de low bit ascii etonneyeux

pourrai je avoir un exemple de programmation ou un petit tuto pour m'aider svp

merci

greg
Avatar de l’utilisateur
mameloose
 
Messages: 1271
Inscription: 20/04/09
Localisation: evreux

Re: offset cdu

Messagede Daniel » Mer 30 Sep 2009 22:33

Salut Greg,

Quand il parle de low bit, c'est pour une programmation avec la carte USB Key.

Voici ton exemple:

This is the SIOC code for a USBKeys and Project Magenta :

Code: Tout sélectionner
Var 0001, name iocp_teclas

Var 0002, name teclado, Link USB_KEYS
{
if &teclado = 47 // menu
{
&k = 629
}
if &teclado = 23 // perf init
{
&k = 624
}
if &teclado = 24 // rte
{
&k = 625
}
if &teclado = 20 // des
{
&k = 628
}
if &teclado = 48 // legs
{
&k = 630
}
if &teclado = 44 // prog
{
&k = 633
}
if &teclado = 39 // n1 altn
{
&k = 634
}
if &teclado = 40 // fix
{
&k = 635
}
if &teclado = 22 // clb
{
&k = 626
}
if &teclado = 19 // crz
{
&k = 627
}
if &teclado = 46 // dep
{
&k = 631
}
if &teclado = 43 // hold
{
&k = 632
}
if &teclado = 41 // ENTER
{
&k = 13
}
if &teclado = 63 // Prev Pg
{
&k = 33
}
if &teclado = 64 // Next Pg
{
&k = 34
}
if &teclado = 88 // 0
{
&k = 48
}
if &teclado = 55 // 1
{
&k = 49
}
if &teclado = 56 // 2
{
&k = 50
}
if &teclado = 53 // 3
{
&k = 51
}
if &teclado = 79 // 4
{
&k = 52
}
if &teclado = 80 // 5
{
&k = 53
}
if &teclado = 77 // 6
{
&k = 54
}
if &teclado = 71 // 7
{
&k = 55
}
if &teclado = 72 // 8
{
&k = 56
}
if &teclado = 69 // 9
{
&k = 57
}
if &teclado = 87 // .
{
&k = 190
}
if &teclado = 81 // barra
{
&k = 191
}
if &teclado = 85 // +
{
&k = 107
}
if &teclado = 84 // Delete
{
&k = 46
}
if &teclado = 82 // Clr
{
&k = 8
}
if &teclado = 83 // Clr
{
&k = 32
}
if &teclado = 38 // A
{
&k = 65
}
if &teclado = 35 // B
{
&k = 66
}
if &teclado = 36 // C
{
&k = 67
}
if &teclado = 33 // D
{
&k = 68
}
if &teclado = 34 // E
{
&k = 69
}
if &teclado = 62 // F
{
&k = 70
}
if &teclado = 59 // G
{
&k = 71
}
if &teclado = 60 // H
{
&k = 72
}
if &teclado = 57 // I
{
&k = 73
}
if &teclado = 58 // J
{
&k = 74
}
if &teclado = 54 // K
{
&k = 75
}
if &teclado = 51 // L
{
&k = 76
}
if &teclado = 52 // M
{
&k = 77
}
if &teclado = 49 // N
{
&k = 78
}
if &teclado = 50 // O
{
&k = 79
}
if &teclado = 78 // P
{
&k = 80
}
if &teclado = 75 // Q
{
&k = 81
}
if &teclado = 76 // R
{
&k = 82
}
if &teclado = 73 // S
{
&k = 83
}
if &teclado = 74 // T
{
&k = 84
}
if &teclado = 70 // U
{
&k = 85
}
if &teclado = 67 // V
{
&k = 86
}
if &teclado = 68 // W
{
&k = 87
}
if &teclado = 65 // X
{
&k = 88
}
if &teclado = 66 // Y
{
&k = 89
}
if &teclado = 86 // Z
{
&k = 90
}
if &teclado = 16 // Linea 1L
{
&k = 112
}
if &teclado = 8 // Linea 2L
{
&k = 113
}
if &teclado = 32 // Linea 3L
{
&k = 114
}
if &teclado = 31 // Linea 4L
{
&k = 115
}
if &teclado = 7 // Linea 5L
{
&k = 116
}
if &teclado = 15 // Linea 6L
{
&k = 117
}

if &teclado = 9 // Linea 1R
{
&k = 118
}
if &teclado = 1 // Linea 2R
{
&k = 119
}
if &teclado = 25 // Linea 3R
{
&k = 120
}
if &teclado = 26 // Linea 4R
{
&k = 121
}
if &teclado = 2 // Linea 5R
{
&k = 122
}
if &teclado = 10 // Linea 6R
{
&k = 123
}
}

var 5, name k, link subrutine
{
if &k <> 0
{
if &k = &tempk
{
&offsetk = &k + &shift
if &shift = 0
{
&shift = 2048
}
else
{
&shift = 0
}
}
else
{
&offsetk = &k
&tempk = &k
}
&k = 0
}
}

var 6, name tempk

var 8, name shift

Var 3000, Link FSUIPC_INOUT, name offsetk, Offset $5428, Length 2 // CDU Functions

De mémoire il faut que tu assignes les mêmes numéro attribué à la lettre dans le fichier ini de sioc.
Dans la section keyboard emulator module, tu vas retrouver quelque chose du genre :

[ assign your keys ]
#1=A
#2=B
#3=C
#4=D
#5=E
#6=F
#7=G
#8=H
#9=I ...


Alors si dans ta programmation SIOC tu attribus la valeur 20 à la lettre 'A' tu dois également attribuer cette valeur dans le ini.

@+
Daniel
Pour de la vraie simulation !
http://www.simul-air.com
Avatar de l’utilisateur
Daniel
 
Messages: 89
Inscription: 20/05/09
Localisation: Laval, Canada

Re: offset cdu

Messagede mameloose » Jeu 1 Oct 2009 13:32

le ini je l'avai oublié celui la merci daniel j'essaye de suite
Avatar de l’utilisateur
mameloose
 
Messages: 1271
Inscription: 20/04/09
Localisation: evreux

Re: offset cdu

Messagede mameloose » Jeu 1 Oct 2009 15:25

ca marche merci merci merci applaublanc chouettedoights chouettedoights
Avatar de l’utilisateur
mameloose
 
Messages: 1271
Inscription: 20/04/09
Localisation: evreux


Retourner vers Programmation Sioc





Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 21 invités