Page 1 sur 1

Re: CDU-MCDU

MessagePosté: Lun 11 Avr 2016 17:51
de mameloose
soit plus precis ! toujours pour project magenta ? as tu un bout de code ?

Re: CDU-MCDU

MessagePosté: Lun 11 Avr 2016 22:43
de mameloose
nan le code dans le sioc .ini c'est pour simuler des touche de clavier mais pour project majenta tu peux programmer comme le dit la doc :

5428 2 CDU “Keyboard Interface” (2 bytes)low byte, ascii character
high byte shift = Bit0, Ctrl = Bit1, Alt = Bit2 … other bits must change if you have two same characters after the other…. (period) = 190
/ (slash) = 191
+ (plus) = 107
DELETE = 46
CLR = 8The space key is not supported for the time beingThis can be used to write characters to the scratchpad of the CDU and to manipulate the LSK and function keys – FX keys from Ascii 112+(X-1)Special ASCII
220 – automatic navaid selection/ autotune (no high byte = enable, shift = disable, ctrl = toggle)
(open to suggestions)

en gros offset $5428 longueur 2 puis tu fais des setbit et clearbit je pense que 1 = a 2 = b ect ....

Re: CDU-MCDU

MessagePosté: Mar 12 Avr 2016 06:48
de mameloose

Re: CDU-MCDU

MessagePosté: Mar 12 Avr 2016 15:07
de mameloose
slash bit 191 ?

Re: CDU-MCDU

MessagePosté: Mar 12 Avr 2016 16:32
de mameloose
oui absolument c'est quoi tes offset ?

Re: CDU-MCDU

MessagePosté: Mer 13 Avr 2016 05:21
de mameloose
Ah ok et la batterie c'est celle de PM je suppose ?

Re: CDU-MCDU

MessagePosté: Mer 13 Avr 2016 14:01
de mameloose
alors c'est un peu compliqué comme c'est du setbit mais ca devrait fonctionner ...

j'ai pris que les offset PM pour battery et portes comme ca tu verras sur ton ecran eicas lower les portes qui souvrent ....

dans le code ca donne ca

Code: Tout sélectionner
Var 0001, name BATTERY, Link FSUIPC_INOUT, Offset $5628, Length 1

Var 0002, name DOORS, Link FSUIPC_INOUT, Offset $56F1, Length 1

Var 0003, name INTERBATTERY, Link IOCARD_SW, Input 5, Type P
{
  IF &INTERBATTERY = 1
  {
    &BATTERY = SETBIT 0
    &DOORS = SETBIT 0
    &DOORS = SETBIT 1
    &DOORS = SETBIT 2
    &DOORS = SETBIT 3
    &FERMETUREPORTE = TIMER 1 ,1 ,10000
  }
  ELSE
  {
    &BATTERY = CLEARBIT 0
    &FERMETUREPORTE = 0   
  }
}

Var 0004, name FERMETUREPORTE, Value 0
{
  IF &FERMETUREPORTE = 1
  {
    &DOORS = CLEARBIT 0
    &DOORS = CLEARBIT 1
    &DOORS = CLEARBIT 2
    &DOORS = CLEARBIT 3
  }
}


j'ai mis 10000 pour le temps ca correspond a 100 secondes pour le test tu pourra modifier