In desperate need of generic SIOC scripts
As the title implies:
I'm looking for generic scripts manly for the usb servo and stepper motor cards.
What i really need is a script for an artificial horizon and (piston) engine instruments.
Uptill now i'v only been able to get the vvi and asi working (altough i need to learn a lot!)
So any script is welkom for my learning!
This is my usable collection so far:
Var 0010, Link FSUIPC_IN, Offset $02C8, Length 4, Type 1 // Vertical Speed
{
L0 = V0010 * 0.7895 // FSUIPC conversion
L1 = L0 * 0.255 // 4000 FPM = 1022 positions
L2 = 511 - L1 // Center
IF L2 < 1 // Upper limit
{
L2 = 1
}
IF L2 > 1022 // Lower Limit
{
L2 = 1022
}
&VSI_SERVO = L2
}
Var 0011, name VSI_SERVO, Link USB_SERVOS, Output 1, PosL 1022, PosC 511, PosR 1 // Servo Motor
Var 0012, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS
{
L0 = V0012 / 128
V9999 = L0 * 100
}
Var 9999
{
L1 = V9999 * 5.05
&IAS_SERVO = L1 / 100
}
Var 0013, name IAS_SERVO, Link USB_SERVOS, Output 2, PosL 1022, PosC 511, PosR 1 // Servo Motor