// ***************************************************************************** // * Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com // ***************************************************************************** // * FileName : indicador flaps USBServos mas LE.txt // * Date : 23/11/2009 Var 0000, Value 0 { &ind_le_extend = 0 &ind_le_trans = 0 } Var 0001, name servo_flaps, Link USB_SERVOS, Output 1, PosL 0, PosC 511, PosR 1023 Var 0002, name flaps_fsuipc, Link FSUIPC_IN, Offset $0BE0, Length 4 { L0 = &flaps_fsuipc L0 = ABS L0 IF L0 = 0 { &ind_le_extend = 0 &ind_le_trans = 0 } ELSE { L1 = 0 &ind_le_trans = 1 IF L0 = 409 { L1 = 1 &ind_le_trans = 0 } IF L0 = 819 { L1 = 1 &ind_le_trans = 0 } IF L0 = 2047 { L1 = 1 &ind_le_trans = 0 } IF L0 = 4095 { L1 = 1 &ind_le_trans = 0 } IF L0 = 6143 { L1 = 1 &ind_le_trans = 0 } IF L0 = 10239 { L1 = 1 &ind_le_trans = 0 } IF L0 = 12287 { L1 = 1 &ind_le_trans = 0 } IF L0 = 16383 { L1 = 1 &ind_le_trans = 0 } &ind_le_extend = L1 } L2 = L0 C0 = L0 >= 0 C1 = L0 <= 409 IF C0 AND C1 { &flaps_low_val = 0 &flaps_high_val = 409 &servo_high_val = 1023 &servo_low_val = 912 // 0 and 1 } C0 = L0 >= 409 C1 = L0 <= 819 IF C0 AND C1 { &flaps_low_val = 409 &flaps_high_val = 819 &servo_high_val = 912 &servo_low_val = 775 // 1 and 2 } C0 = L0 >= 819 C1 = L0 <= 2047 IF C0 AND C1 { &flaps_low_val = 819 &flaps_high_val = 2047 &servo_high_val = 775 &servo_low_val = 638 // 2 and 5 } C0 = L0 >= 2047 C1 = L0 <= 4095 IF C0 AND C1 { &flaps_low_val = 2047 &flaps_high_val = 4095 &servo_high_val = 638 &servo_low_val = 501 // 5 and 10 } C0 = L0 >= 4095 C1 = L0 <= 6143 IF C0 AND C1 { &flaps_low_val = 4095 &flaps_high_val = 6143 &servo_high_val = 501 &servo_low_val = 400 // 10 and 15 } C0 = L0 >= 6143 C1 = L0 <= 10239 IF C0 AND C1 { &flaps_low_val = 6143 &flaps_high_val = 10239 &servo_high_val = 400 &servo_low_val = 314 // 15 and 25 } C0 = L0 >= 10239 C1 = L0 <= 12287 IF C0 AND C1 { &flaps_low_val = 10239 &flaps_high_val = 12287 &servo_high_val = 314 &servo_low_val = 228 // 25 and 30 } C0 = L0 >= 12287 C1 = L0 <= 16383 IF C0 AND C1 { &flaps_low_val = 12287 &flaps_high_val = 16383 &servo_high_val = 228 &servo_low_val = 192 // 30 and 40 } &servo_calc = &servo_low_val - &servo_high_val &flaps_calc = &flaps_high_val - &flaps_low_val &flaps_val = L0 - &flaps_low_val &servo_val = &servo_calc * &flaps_val &servo_val = &servo_val / &flaps_calc L1 = &servo_high_val + &servo_val &servo_flaps = L1 } Var 0003, name servo_val Var 0004, name flaps_calc Var 0005, name servo_calc Var 0006, name flaps_val Var 0007, name flaps_low_val Var 0008, name flaps_high_val Var 0009, name servo_high_val Var 0010, name servo_low_val Var 0011, name ind_le_extend, Link IOCARD_OUT, Output 22 Var 0012, name ind_le_trans, Link IOCARD_OUT, Output 21