- Code: Tout sélectionner
// ------------------------------------------------------------
// Codeur Mins
// ------------------------------------------------------------
Var 1400, Link IOCARD_ENCODER, Input 12, Aceleration 1, Type 2 // MINS
{
if V1335 = 1
{
V1404 = LIMIT 0,200, V1400 // Radio
V1203 = V1404
}
else
{
L0 = V1400 * -1
V1403 = LIMIT -200,-1, L0 // baro
V1203 = V1403
}
}
Var 1340, Link IOCARD_SW, Input 9 // RST
{
IF V1340 = 1
{
if V1335 = 1
{
V1404 = 20
V1203 = 20
}
else
{
V1403 = -20
V1203 = -20
}
}
}
Var 1335, Link IOCARD_SW, Input 14 // radio/baro
{
IF V1335 = 1 // si ON
{
V0066 = 64 // radio
V1203 = V1404
}
ELSE
{
V0066 = 65 // baro
V1203 = V1403
}
}
Avec quelques explications :
// 1403 valeur interne baro
// 1404 valeur interne radio
// 0066 offset $04F2 commande MCP
Var 1203, Link FSUIPC_OUT, Offset $04FA, Length 2 // Capt decision height
Var 0066, Link FSUIPC_OUT, Offset $04F2, Length 2 // commande MCP
Voici ce qu'il y a à propos de 04F2 dans la doc (tu l'as ?) : http://www.projectmagenta.com/resources/PMOffsets.html
04F2 2 MCP/FCU Throughpass (See MCPcodes at the end) (Read/Write)
Example: Write Value 33 to engage AP2 (K033 ELAN Code). Once read, the MCP resets the value to 0 and is ready for another read.
Only last three digits are used, you can use the thousands to indicate the key has been pressed again (state change), i.e. 4033 and 7033 do the same
DisableRemoteMCP must be set to OFF in the INI file for this to work.
setDH K064
setMDA K065
Franchement je ne suis pas sur que la partie concernant la variable 0066 soit obligatoire, tu devrais tester sans déjà.