guenseli Posted September 3, 2010 Report Posted September 3, 2010 update 16th Sept and another one: several new commands: TCAS, Battery, "Avionics" etc... new items since release are marked in the parameter list updated 15th of Sept inserted parameters for fast increase and decrease of SPD (36, 37) and HDG (25, 26) (see list of parameters) (credits to PaulMidd for this idea!) you have to redownload AS_AirbusX.txt and copy the content into your LUA updated 14th of September reason: added Petes throttle plugins updated 8th of Sept. reason: added code for throttle detends ------------------------------------------------------ I have written a LUA Script during Betatest because Finn from Aerosoft provided me nicely with the LUA Variables. You can assign this functions via a registered copy of FSUIPC Here's a very short tutorial how to "install" LUA files I copied this tutorial out of one of my stickies in the FSUIPC forum. The "tutorial" is for the PMDG J41, but thats just a case of naming. Simply change "J41" to "AS_AirbusX" or whatever you like. To get acces to the single commands you have to do the following: 1) copy the code below 2) insert it into an empty editor or wordpad file and save it as e.g. AS_AirbusX.LUA into the FSX - Modules Folder 3) open FSUIPC menu and choose LUA AirbusX from the drop down 4) insert different parameter numbers depending on the action you want (green field) (this example picture is for the J41. For the AirbusX you have to name the file of course AS_AirbusX.LUA or whatever. Then the name in the dropdown (red field) will be Lua AS_AirbusX)! Note: I have to make slight corrections the next days/weeks (depends on my time), e.g. some switch sounds are not fitting. You can already "install" this LUA script, the parameter number will NOT change with a newer version. You simply have to overwrite this one when a new LUA Script will be provided. All functions are for ON/OFF or toggle switches, whatever fits your hardware. Please have a close look into FSUIPC manual. Every question regearding LUA or FSUIPC is answered there!!! Here is a list which function are in this LUA file: -- List of parameters -- -- Autopilot ----------- -- -- 1 AP1 button on -- 2 AP1 button off -- 3 AP1 button toggle -- 4 AP2 button on -- 5 AP2 button off -- 6 AP2 button toggle -- 7 ATHR button on -- 8 ATHR button off -- 9 ATHR button toggle -- 10 AP LOC button on -- 11 AP LOC button off -- 12 AP LOC button toggle -- 13 AP APPR button on -- 14 AP APPR button off -- 15 AP APPR button toggle -- 16 AP EXPED button on -- 17 AP EXPED button off -- 18 AP EXPED button toggle -- 20 Heading mode selection; normal -- 21 Heading mode selection: managed -- 22 Heading mode selection normal/managed toggle -- 23 Heading inc -- 24 Heading dec -- 25 Heading inc fast -- 26 Heading dec fast -- 30 Speed/mach mode selection toggle -- 31 Speed mode selection; normal -- 32 Speed mode selection: managed -- 33 Speed mode selection normal/managed toggle -- 34 Speed or Mach inc -- 35 Speed or Mach dec -- 36 Speed or Mach inc fast -- 37 Speed or Mach dec fast -- 40 Altitude rate selection toggle (100/1000) -- 41 Altitude rate selection slow (100) -- 42 Altitude rate selection fast (1000) -- 43 Altitude mode selection: normal -- 44 Altitude mode selection: managed -- 45 Altitude mode selection normal/managed toggle -- 46 ALT inc slow or fast -- 47 ALT dec slow or fast -- 48 ALT inc slow (100) -- 49 ALT inc fast (1000) -- 50 ALT dec slow (100) -- 51 ALT dec fast (1000) -- 52 V/S Level -- 53 V/S inc -- 54 V/S dec -- 60 F/D ON -- 61 F/D OFF -- 62 F/D Toggle -- 63 LS ON -- 64 LS OFF -- 65 LS Toggle -- -- Navigations Display (ND)--------------------------------- -- -- 70 CSTR on -- 71 WPT on -- 72 VOR on -- 73 NDB on -- 74 ARPT on -- 80 Nd Mode inc -- 81 Nd Mode dec -- 82 Nd Range inc -- 83 Nd Range dec -- 90 VOR1 button on -- 91 ADF1 button on -- 92 VOR/ADF1 button off -- 93 VOR2 button on -- 94 ADF2 button on -- 95 VOR/ADF2 button off -- 96 BARO/STD toggle -- 97 Master Warning off -- 98 Master Caution off -- 99 Master Warning AND Caution off -- -- lights and signs ------------------------------------------ -- -- 100 strobe on -- 101 strobe auto -- 102 strobe off -- 103 strobe toggle on/off -- Beacon: Uses standard FSX assignment i.e: (A:LIGHT BEACON, bool) -- Winglights:Uses standard FSX assignment i.e: (A:LIGHT WING, bool) -- NAV / Logo lights:Uses standard FSX assignment i.e: (A:LIGHT NAV, bool);(A:LIGHT LOGO, bool) -- (Note !! Both are tswitched with the same switch) -- 104 Runway lights on -- 105 Runway lights off -- 106 Landing light retracted -- 107 Landing light on -- 108 Landing light off -- 109 Landing light toggle on/off -- 110 Taxi light off -- 111 Taxi light on -- 112 Taxi light T.O -- 113 Taxi light toggle off/T.O --Panel lights:Uses standard FSX assignment i.e: (A:LIGHT PANEL, bool) -- 114 seat sign off -- 115 seat sign auto -- 116 seat sign on -- 117 seat sign toggle off/on -- 118 smoke sign off -- 119 smoke sign auto -- 120 smoke sign on -- 121 smoke sign toggle off/on -- 122 emergency light off -- 123 emergency light armed -- 124 emergency light on -- -- systems ------------------------------------------ -- -- 130 APU Master on -- 131 APU Master off -- 132 Master toggle -- 133 APU Start on -- 134 APU Start off -- 135 STart toggle -- 136 APU Master AND Start toggle -- 140 Autobrake inc -- 141 Autobrake dec -- 142 Autobrake MAX -- 143 Autobrake OFF -- 144 Autobrake MIN -- 145 Autobrake MED -- 148 TCAS dial inc -- 149 TCAS dial dec -- 150 Engine1 Master on -- 151 Engine1 Master off -- 152 Engine1 Master toggle -- 153 Engine2 Master on -- 154 Engine2 Master off -- 155 Engine2 Master toggle -- 156 IGN on -- 157 IGN off -- 158 IGN toggle -- -- ECAM ------------------------------------------ -- -- 160 ECAM ENG -- 161 ECAM BLEED -- 162 ECAM PRESS -- 163 ECAM ELEC -- 164 ECAM HYD -- 165 ECAM FUEL -- 166 ECAM APU -- 167 ECAM COND -- 168 ECAM DOOR -- 169 ECAM WHEEL -- 170 ECAM FCTL -- 171 ECAM ALL -- 175 ECAM CLR -- 176 ECAM RCL -- 180 ECAM TO config -- 185 ECAM, PFDs, NDs, Radio on ("avionics") -- 186 ECAM, PFDs, NDs, Radio off ("avionics") -- -- further systems ------------------------------------------ -- -- 190 APU Bleed on -- 191 APU Bleed off -- 192 APU Bleed toggle -- 200 BAT1 on -- 201 BAT1 off -- 202 BAT1 toggle -- 203 BAT2 on -- 204 BAT2 off -- 205 BAT2 toggle -- 206 BAT1+2 on -- 207 BAT1+2 off -- 208 BAT1+2 toggle -- Aerosoft AirbusX -- LUA Script V 1.2 -- Friday, the 16th, 2010 ;-) -- (C) Guenter Steiner/guenseli -- List of parameters -- -- Autopilot ----------- -- -- 1 AP1 button on -- 2 AP1 button off -- 3 AP1 button toggle -- 4 AP2 button on -- 5 AP2 button off -- 6 AP2 button toggle -- 7 ATHR button on -- 8 ATHR button off -- 9 ATHR button toggle -- 10 AP LOC button on -- 11 AP LOC button off -- 12 AP LOC button toggle -- 13 AP APPR button on -- 14 AP APPR button off -- 15 AP APPR button toggle -- 16 AP EXPED button on -- 17 AP EXPED button off -- 18 AP EXPED button toggle -- 20 Heading mode selection; normal -- 21 Heading mode selection: managed -- 22 Heading mode selection normal/managed toggle -- 23 Heading inc -- 24 Heading dec -- 25 Heading inc fast -- 26 Heading dec fast -- 30 Speed/mach mode selection toggle -- 31 Speed mode selection; normal -- 32 Speed mode selection: managed -- 33 Speed mode selection normal/managed toggle -- 34 Speed or Mach inc -- 35 Speed or Mach dec -- 36 Speed or Mach inc fast -- 37 Speed or Mach dec fast -- 40 Altitude rate selection toggle (100/1000) -- 41 Altitude rate selection slow (100) -- 42 Altitude rate selection fast (1000) -- 43 Altitude mode selection: normal -- 44 Altitude mode selection: managed -- 45 Altitude mode selection normal/managed toggle -- 46 ALT inc slow or fast -- 47 ALT dec slow or fast -- 48 ALT inc slow (100) -- 49 ALT inc fast (1000) -- 50 ALT dec slow (100) -- 51 ALT dec fast (1000) -- 52 V/S Level -- 53 V/S inc -- 54 V/S dec -- 60 F/D ON -- 61 F/D OFF -- 62 F/D Toggle -- 63 LS ON -- 64 LS OFF -- 65 LS Toggle -- -- Navigations Display (ND)--------------------------------- -- -- 70 CSTR on -- 71 WPT on -- 72 VOR on -- 73 NDB on -- 74 ARPT on -- 80 Nd Mode inc -- 81 Nd Mode dec -- 82 Nd Range inc -- 83 Nd Range dec -- 90 VOR1 button on -- 91 ADF1 button on -- 92 VOR/ADF1 button off -- 93 VOR2 button on -- 94 ADF2 button on -- 95 VOR/ADF2 button off -- 96 BARO/STD toggle -- 97 Master Warning off -- 98 Master Caution off -- 99 Master Warning AND Caution off -- -- lights and signs ------------------------------------------ -- -- 100 strobe on -- 101 strobe auto -- 102 strobe off -- 103 strobe toggle on/off -- Beacon: Uses standard FSX assignment i.e: (A:LIGHT BEACON, bool) -- Winglights:Uses standard FSX assignment i.e: (A:LIGHT WING, bool) -- NAV / Logo lights:Uses standard FSX assignment i.e: (A:LIGHT NAV, bool);(A:LIGHT LOGO, bool) -- (Note !! Both are tswitched with the same switch) -- 104 Runway lights on -- 105 Runway lights off -- 106 Landing light retracted -- 107 Landing light on -- 108 Landing light off -- 109 Landing light toggle on/off -- 110 Taxi light off -- 111 Taxi light on -- 112 Taxi light T.O -- 113 Taxi light toggle off/T.O --Panel lights:Uses standard FSX assignment i.e: (A:LIGHT PANEL, bool) -- 114 seat sign off -- 115 seat sign auto -- 116 seat sign on -- 117 seat sign toggle off/on -- 118 smoke sign off -- 119 smoke sign auto -- 120 smoke sign on -- 121 smoke sign toggle off/on -- 122 emergency light off -- 123 emergency light armed -- 124 emergency light on -- -- systems ------------------------------------------ -- -- 130 APU Master on -- 131 APU Master off -- 132 Master toggle -- 133 APU Start on -- 134 APU Start off -- 135 STart toggle -- 136 APU Master AND Start toggle -- 140 Autobrake inc -- 141 Autobrake dec -- 142 Autobrake MAX -- 143 Autobrake OFF -- 144 Autobrake MIN -- 145 Autobrake MED -- 148 TCAS dial inc -- 149 TCAS dial dec -- 150 Engine1 Master on -- 151 Engine1 Master off -- 152 Engine1 Master toggle -- 153 Engine2 Master on -- 154 Engine2 Master off -- 155 Engine2 Master toggle -- 156 IGN on -- 157 IGN off -- 158 IGN toggle -- -- ECAM ------------------------------------------ -- -- 160 ECAM ENG -- 161 ECAM BLEED -- 162 ECAM PRESS -- 163 ECAM ELEC -- 164 ECAM HYD -- 165 ECAM FUEL -- 166 ECAM APU -- 167 ECAM COND -- 168 ECAM DOOR -- 169 ECAM WHEEL -- 170 ECAM FCTL -- 171 ECAM ALL -- 175 ECAM CLR -- 176 ECAM RCL -- 180 ECAM TO config -- 185 ECAM, PFDs, NDs, Radio on ("avionics") -- 186 ECAM, PFDs, NDs, Radio off ("avionics") -- -- further systems ------------------------------------------ -- -- 190 APU Bleed on -- 191 APU Bleed off -- 192 APU Bleed toggle -- 200 BAT1 on -- 201 BAT1 off -- 202 BAT1 toggle -- 203 BAT2 on -- 204 BAT2 off -- 205 BAT2 toggle -- 206 BAT1+2 on -- 207 BAT1+2 off -- 208 BAT1+2 toggle -------------------------------------------------------------- Autopilot (FCU) -------------------------------------------------------------- AP1 -- AP1 button on if ipcPARAM == 1 then LVarSet = "L:AB_AP_AP1" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP1 button off if ipcPARAM == 2 then LVarSet = "L:AB_AP_AP1" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP1 button toggle if ipcPARAM == 3 then LVarSet = "L:AB_AP_AP1" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- AP2 -- AP2 button on if ipcPARAM == 4 then LVarSet = "L:AB_AP_AP2" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP2 button off if ipcPARAM == 5 then LVarSet = "L:AB_AP_AP2" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP2 button toggle if ipcPARAM == 6 then LVarSet = "L:AB_AP_AP2" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- ATHR -- ATHR button on if ipcPARAM == 7 then LVarSet = "L:AB_AP_ATHR" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ATHR button off if ipcPARAM == 8 then LVarSet = "L:AB_AP_ATHR" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ATHR button toggle if ipcPARAM == 9 then LVarSet = "L:AB_AP_ATHR" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- AP LOC -- AP LOC button on if ipcPARAM == 10 then LVarSet = "L:AB_AP_LOC" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP LOC button off if ipcPARAM == 11 then LVarSet = "L:AB_AP_LOC" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP LOC button toggle if ipcPARAM == 12 then LVarSet = "L:AB_AP_LOC" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- AP APPR -- AP APPR button on if ipcPARAM == 13 then LVarSet = "L:AB_AP_LOC2" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP APPR button off if ipcPARAM == 14 then LVarSet = "L:AB_AP_LOC2" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP APPR button toggle if ipcPARAM == 15 then LVarSet = "L:AB_AP_LOC2" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- AP EXPED -- AP EXP button on if ipcPARAM == 16 then LVarSet = "L:AB_AP_EXP" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP EXP button off if ipcPARAM == 17 then LVarSet = "L:AB_AP_EXP" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- AP EXP button toggle if ipcPARAM == 18 then LVarSet = "L:AB_AP_EXP" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- HDG -- Heading mode selection: normal if ipcPARAM == 20 then LVarSet = "L:AB_AP_HDGmode" ipc.writeLvar(LVarSet, -1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Heading mode selection: managed if ipcPARAM == 21 then LVarSet = "L:AB_AP_HDGmode" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Heading mode selection normal/managed toggle if ipcPARAM == 22 then LVarSet = "L:AB_AP_HDGmode_set" LVarGet = ipc.readLvar(LVarSet) val = 1 if ipc.readLvar(LVarSet) == 1 then val = -1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Heading inc if ipcPARAM == 23 then LVarSet = "L:AB_AP_HDG_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1) end -- Heading dec if ipcPARAM == 24 then LVarSet = "L:AB_AP_HDG_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-1) end -- Heading inc fast if ipcPARAM == 25 then LVarSet = "L:AB_AP_HDG_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+10) end -- Heading dec fast if ipcPARAM == 26 then LVarSet = "L:AB_AP_HDG_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-10) end -------------------------------------------------------------- SPD -- Speed/mach mode selection toggle if ipcPARAM == 30 then LVarSet = "L:AB_AP_SPDMACH" LVarGet = ipc.readLvar(LVarSet) val = 1 if ipc.readLvar(LVarSet) == 1 then val = 0 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Speed mode selection: normal if ipcPARAM == 31 then LVarSet = "L:AB_AP_SPDmode" ipc.writeLvar(LVarSet, -1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Speed mode selection: managed if ipcPARAM == 32 then LVarSet = "L:AB_AP_SPDmode" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Speed mode selection normal/managed toggle if ipcPARAM == 33 then LVarSet = "L:AB_AP_SPDmode_set" LVarGet = ipc.readLvar(LVarSet) val = 1 if ipc.readLvar(LVarSet) == 1 then val = -1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- speed or mach inc if ipcPARAM == 34 then LVarSPD = ipc.readLvar("L:AB_AP_SPDMACH") if LVarSPD == 0 then LVarSet = "L:AB_AP_SPEED_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1) elseif LVarSPD == 1 then LVarSet = "L:AB_AP_Mach_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+0.01) end end -- speed or mach dec if ipcPARAM == 35 then LVarSPD = ipc.readLvar("L:AB_AP_SPDMACH") if LVarSPD == 0 then LVarSet = "L:AB_AP_SPEED_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-1) elseif LVarSPD == 1 then LVarSet = "L:AB_AP_Mach_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-0.01) end end -- speed or mach inc fast if ipcPARAM == 36 then LVarSPD = ipc.readLvar("L:AB_AP_SPDMACH") if LVarSPD == 0 then LVarSet = "L:AB_AP_SPEED_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+10) elseif LVarSPD == 1 then LVarSet = "L:AB_AP_Mach_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+0.1) end end -- speed or mach dec if ipcPARAM == 37 then LVarSPD = ipc.readLvar("L:AB_AP_SPDMACH") if LVarSPD == 0 then LVarSet = "L:AB_AP_SPEED_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-10) elseif LVarSPD == 1 then LVarSet = "L:AB_AP_Mach_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-0.1) end end -------------------------------------------------------------- ALT -- Altitude rate selection toggle (100/1000) if ipcPARAM == 40 then LVarSet = "L:AB_AP_ALTSTEP" LVarGet = ipc.readLvar(LVarSet) val = 1 if ipc.readLvar(LVarSet) == 1 then val = 0 end ipc.writeLvar(LVarSet, val) end -- Altitude rate selection slow (100) if ipcPARAM == 41 then LVarSet = "L:AB_AP_ALTSTEP" ipc.writeLvar(LVarSet, 0) end -- Altitude rate selection fast (1000) if ipcPARAM == 42 then LVarSet = "L:AB_AP_ALTSTEP" ipc.writeLvar(LVarSet, 1) end -- Altitude mode selection: normal if ipcPARAM == 43 then LVarSet = "L:AB_AP_ALTmode" ipc.writeLvar(LVarSet, -1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Altitude mode selection: managed if ipcPARAM == 44 then LVarSet = "L:AB_AP_ALTmode" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Altitude mode selection normal/managed toggle if ipcPARAM == 45 then LVarSet = "L:AB_AP_ALTmode_set" LVarGet = ipc.readLvar(LVarSet) val = 1 if ipc.readLvar(LVarSet) == 1 then val = -1 end ipc.writeLvar("L:AB_AP_ALTmode", val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ALT inc if ipcPARAM == 46 then LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" if LVarALT == 0 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+100) elseif LVarALT == 1 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1000) end end -- ALT dec if ipcPARAM == 47 then LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" if LVarALT == 0 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-100) elseif LVarALT == 1 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-1000) end end -- ALT inc slow (100) if ipcPARAM == 48 then LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+100) end -- ALT inc fast (1000) if ipcPARAM == 49 then LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1000) end -- ALT dec slow (100) if ipcPARAM == 50 then LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-100) end -- ALT dec fast (1000) if ipcPARAM == 51 then LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet-1000) end -------------------------------------------------------------- V/S -- V/S level if ipcPARAM == 52 then LVarSet = "L:AB_AP_VSlevel" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, 1) end -- V/S inc if ipcPARAM == 53 then ipc.control(65894) end -- V/S dec if ipcPARAM == 54 then ipc.control(65895) end -------------------------------------------------------------- F/D -- F/D button on if ipcPARAM == 60 then LVarSet = "L:AB_MPL_FD" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- F/D button off if ipcPARAM == 61 then LVarSet = "L:AB_MPL_FD" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- F/D button toggle if ipcPARAM == 62 then LVarSet = "L:AB_MPL_FD" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- LS -- LS button on if ipcPARAM == 63 then LVarSet = "L:AB_MPL_ILS" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- LS button off if ipcPARAM == 64 then LVarSet = "L:AB_MPL_ILS" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- LS button toggle if ipcPARAM == 65 then LVarSet = "L:AB_MPL_ILS" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- ND objects -- ND CSTR On if ipcPARAM == 70 then ipc.writeLvar("L:AB_MPL_ND_CSTR", 1) ipc.writeLvar("L:AB_MPL_ND_WPT", 0) ipc.writeLvar("L:AB_MPL_ND_VOR", 0) ipc.writeLvar("L:AB_MPL_ND_NDB", 0) ipc.writeLvar("L:AB_MPL_ND_ARPT", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ND WPT On if ipcPARAM == 71 then ipc.writeLvar("L:AB_MPL_ND_CSTR", 0) ipc.writeLvar("L:AB_MPL_ND_WPT", 1) ipc.writeLvar("L:AB_MPL_ND_VOR", 0) ipc.writeLvar("L:AB_MPL_ND_NDB", 0) ipc.writeLvar("L:AB_MPL_ND_ARPT", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ND VOR On if ipcPARAM == 72 then ipc.writeLvar("L:AB_MPL_ND_CSTR", 0) ipc.writeLvar("L:AB_MPL_ND_WPT", 0) ipc.writeLvar("L:AB_MPL_ND_VOR", 1) ipc.writeLvar("L:AB_MPL_ND_NDB", 0) ipc.writeLvar("L:AB_MPL_ND_ARPT", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ND NDB On if ipcPARAM == 73 then ipc.writeLvar("L:AB_MPL_ND_CSTR", 0) ipc.writeLvar("L:AB_MPL_ND_WPT", 0) ipc.writeLvar("L:AB_MPL_ND_VOR", 0) ipc.writeLvar("L:AB_MPL_ND_NDB", 1) ipc.writeLvar("L:AB_MPL_ND_ARPT", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ND ARPT On if ipcPARAM == 74 then ipc.writeLvar("L:AB_MPL_ND_CSTR", 0) ipc.writeLvar("L:AB_MPL_ND_WPT", 0) ipc.writeLvar("L:AB_MPL_ND_VOR", 0) ipc.writeLvar("L:AB_MPL_ND_NDB", 0) ipc.writeLvar("L:AB_MPL_ND_ARPT", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- ND mode -- ND mode inc if ipcPARAM == 80 then i = ipc.readLvar("L:AB_MPL_ND_Mode") if i ipc.writeLvar("L:AB_MPL_ND_Mode", i+1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -- ND mode dec if ipcPARAM == 81 then i = ipc.readLvar("L:AB_MPL_ND_Mode") if i > 0 then ipc.writeLvar("L:AB_MPL_ND_Mode", i-1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -------------------------------------------------------------- ND Range -- ND Range inc if ipcPARAM == 82 then i = ipc.readLvar("L:AB_MPL_ND_Range") if i ipc.writeLvar("L:AB_MPL_ND_Range", i+1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -- ND Range dec if ipcPARAM == 83 then i = ipc.readLvar("L:AB_MPL_ND_Range") if i > 0 then ipc.writeLvar("L:AB_MPL_ND_Range", i-1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -------------------------------------------------------------- VOR/ADF1 -- VOR1 button on if ipcPARAM == 90 then LVarSet = "L:AB_MPL_ND_Arrow1" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ADF button on if ipcPARAM == 91 then LVarSet = "L:AB_MPL_ND_Arrow1" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- VOR/ADF1 off if ipcPARAM == 92 then LVarSet = "L:AB_MPL_ND_Arrow1" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- VOR/ADF2 -- VOR2 button on if ipcPARAM == 93 then LVarSet = "L:AB_MPL_ND_Arrow2" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ADF2 button on if ipcPARAM == 94 then LVarSet = "L:AB_MPL_ND_Arrow2" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- VOR/ADF2 off if ipcPARAM == 95 then LVarSet = "L:AB_MPL_ND_Arrow2" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- BARO/STD -- baro/STD button toggle if ipcPARAM == 96 then LVarSet = "L:AB_MPL_Baro_STD" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- Master WARN/CAUTION -- Master Warn off if ipcPARAM == 97 then LVarSet = "L:AB_MPL_Master_Warning_Light" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Master caution off if ipcPARAM == 98 then LVarSet = "L:AB_MPL_Master_Caution_Light" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Master caution AND warn off if ipcPARAM == 99 then LVarSet = "L:AB_MPL_Master_Caution_Light" LVarSet2 = "L:AB_MPL_Master_Warning_Light" ipc.writeLvar(LVarSet, 0) ipc.sleep(10) ipc.writeLvar(LVarSet2, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- lights -------------------------------------------------------------- strobe -- strobe on if ipcPARAM == 100 then LVarSet = "L:Strobe_light" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- strobe auto if ipcPARAM == 101 then LVarSet = "L:Strobe_light" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- strobe off if ipcPARAM == 102 then LVarSet = "L:Strobe_light" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- strobe toggle on/off if ipcPARAM == 103 then LVarSet = "L:Strobe_light" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- runway lights -- RW lights on if ipcPARAM == 104 then LVarSet = "L:AB_OVH_LIGHTS_RWYTURNOFF" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- RW lights off if ipcPARAM == 105 then LVarSet = "L:AB_OVH_LIGHTS_RWYTURNOFF" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- landing lights -- LL retracted if ipcPARAM == 106 then LVarSet = "L:Landlight_switch" ipc.writeLvar(LVarSet, 0) ipc.control(66060) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- LL on if ipcPARAM == 107 then LVarSet = "L:Landlight_switch" ipc.writeLvar(LVarSet, 2) ipc.control(66059) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- LL off if ipcPARAM == 108 then LVarSet = "L:Landlight_switch" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- LL toggle on/off if ipcPARAM == 109 then LVarSet = "L:Landlight_switch" val = 0 valL = 66060 if ipc.readLvar(LVarSet) == 0 then val = 2 valL = 66059 end ipc.writeLvar(LVarSet, val) ipc.control(valL) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- taxi lights -- Taxi off if ipcPARAM == 110 then LVarSet = "L:AB_TAXI_LT" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Taxi on if ipcPARAM == 111 then LVarSet = "L:AB_TAXI_LT" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Taxi T.O. if ipcPARAM == 112 then LVarSet = "L:AB_TAXI_LT" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Taxi toggle off/T.O. if ipcPARAM == 113 then LVarSet = "L:AB_TAXI_LT" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- seat sign -- seat sign off if ipcPARAM == 114 then LVarSet = "L:AB_OVH_SEATBELT" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- seat sign auto if ipcPARAM == 115 then LVarSet = "L:AB_OVH_SEATBELT" ipc.writeLvar(LVarSet, 25) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- seat sign on if ipcPARAM == 116 then LVarSet = "L:AB_OVH_SEATBELT" ipc.writeLvar(LVarSet, 50) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- seat sign toggle on/off if ipcPARAM == 117 then LVarSet = "L:AB_OVH_SEATBELT" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 50 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- smoke sign -- smoke sign off if ipcPARAM == 118 then LVarSet = "L:AB_OVH_NO_SMOKING" ipc.writeLvar(LVarSet, -1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) end -- smoke sign auto if ipcPARAM == 119 then LVarSet = "L:AB_OVH_NO_SMOKING" ipc.writeLvar(LVarSet, 25) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- smoke sign on if ipcPARAM == 120 then LVarSet = "L:AB_OVH_NO_SMOKING" ipc.writeLvar(LVarSet, 50) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- smoke sign toggle on/off if ipcPARAM == 121 then LVarSet = "L:AB_OVH_NO_SMOKING" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 50 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- emer lights -- EL off if ipcPARAM == 122 then LVarSet = "L:AB_OVH_EMER_LT" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- EL armed if ipcPARAM == 123 then LVarSet = "L:AB_OVH_EMER_LT" ipc.writeLvar(LVarSet, 25) ipc.writeLvar("L:ASC_NOSMOKE-SEATBELTS", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- el on if ipcPARAM == 124 then LVarSet = "L:AB_OVH_EMER_LT" ipc.writeLvar(LVarSet, 50) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- systems -------------------------------------------------------------- APU Master -- APU Master on if ipcPARAM == 130 then LVarSet = "AB_OVH_APU_MASTER" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Master off if ipcPARAM == 131 then LVarSet = "AB_OVH_APU_MASTER" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Master toggle if ipcPARAM == 132 then LVarSet = "AB_OVH_APU_MASTER" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- APU Start -- APU Master on if ipcPARAM == 133 then LVarSet = "AB_OVH_APU_Start" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Master off if ipcPARAM == 134 then LVarSet = "AB_OVH_APU_Start" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Master toggle if ipcPARAM == 135 then LVarSet = "AB_OVH_APU_Start" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- APU Master and Start combined toggle -- APU Master AND Start toggle if ipcPARAM == 136 then LVarSet = "AB_OVH_APU_Start" LVarSet2 = "AB_OVH_APU_Master" val = 0 ipc.writeLvar(LVarSet, val) if ipc.readLvar(LVarSet2) == 0 then val = 1 ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ipc.writeLvar(LVarSet2, val) ipc.sleep(500) ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- Autobrake -- Autobrake inc if ipcPARAM == 140 then i = ipc.readLvar("L:Autobrake_position") if i ipc.writeLvar("L:Autobrake_position", i+1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -- Autobrake dec if ipcPARAM == 141 then i = ipc.readLvar("L:Autobrake_position") if i > 0 then ipc.writeLvar("L:Autobrake_position", i-1) ipc.sleep(10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end end -- Autobrake MAX if ipcPARAM == 142 then LVarSet = "L:Autobrake_position" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Autobrake OFF if ipcPARAM == 143 then LVarSet = "L:Autobrake_position" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Autobrake MIN if ipcPARAM == 144 then LVarSet = "L:Autobrake_position" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Autobrake MED if ipcPARAM == 145 then LVarSet = "L:Autobrake_position" ipc.writeLvar(LVarSet, 3) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- TCAS -- TCAS dial inc if ipcPARAM == 148 then LVarSet = "L:Mod_Xponder_mode" LstateSet = ipc.ReadLvar(LVarSet) if LstateSet val = LstateSet +1 ipc.writeLvar("L:SmallOverheadPushButtons", 1) else val = 5 end ipc.writeLvar(LVarSet, val) end -- TCAS dial dec if ipcPARAM == 149 then LVarSet = "L:Mod_Xponder_mode" LstateSet = ipc.ReadLvar(LVarSet) if LstateSet >=1 then val = LstateSet -1 ipc.writeLvar("L:SmallOverheadPushButtons", 1) else val = 0 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- Engines on off -- ENG1 Master on if ipcPARAM == 150 then LVarSet = "L:AB_PDS_Eng1Master" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ENG1 Master off if ipcPARAM == 151 then LVarSet = "L:AB_PDS_Eng1Master" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ENG1 Master toggle if ipcPARAM == 152 then LVarSet = "L:AB_PDS_Eng1Master" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ENG2 Master on if ipcPARAM == 153 then LVarSet = "L:AB_PDS_Eng2Master" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ENG2 Master off if ipcPARAM == 154 then LVarSet = "L:AB_PDS_Eng2Master" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ENG2 Master toggle if ipcPARAM == 155 then LVarSet = "L:AB_PDS_Eng2Master" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- IGN on off -- IGN on if ipcPARAM == 156 then LVarSet = "L:AB_PDS_ignition" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- IGN off if ipcPARAM == 157 then LVarSet = "L:AB_PDS_ignition" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- IGN toggle if ipcPARAM == 158 then LVarSet = "L:AB_PDS_ignition" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -------------------------------------------------------------- ECAM -- ECAM ENG if ipcPARAM == 160 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM BLEED if ipcPARAM == 161 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 2) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM PRESS if ipcPARAM == 162 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 3) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM ELEC if ipcPARAM == 163 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 4) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM HYD if ipcPARAM == 164 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 5) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM FUEL if ipcPARAM == 165 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 6) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM APU if ipcPARAM == 166 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 7) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM COND if ipcPARAM == 167 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 8) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM DOOR if ipcPARAM == 168 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 9) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM WHEEL if ipcPARAM == 169 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 10) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM FCTL if ipcPARAM == 170 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 11) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM ALL if ipcPARAM == 171 then LVarSet = "L:ECAM_Mode" ipc.writeLvar(LVarSet, 12) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------ECAM CLR, RCL -- ECAM CLR if ipcPARAM == 175 then LVarSet = "L:AB_ECAM_CLR" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM RCL if ipcPARAM == 176 then LVarSet = "L:AB_ECAM_CLR" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------ECAM TO config -- ECAM TO config if ipcPARAM == 180 then ipc.writeLvar("L:AB_ECAM_TOCFG", 1) ipc.writeLvar("L:AB_ECAM_TOconf", 1) ipc.writeLvar("L:AB_ECAM_TOconf_Hasbeentested", 1) ipc.writeLvar("L:AB_ECAM_RCL", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(1500) ipc.writeLvar("L:AB_ECAM_TOCFG", 0) end ---------------------------------------------------------ECAM, PFDs, NDs on off -- ECAM, PFDs, NDs, Radio on if ipcPARAM == 185 then ipc.writeLvar("L:AB_PDS_RADIO_POWER", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(50) ipc.writeLvar("L:AB_MPL_PFD_Power", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(100) ipc.writeLvar("L:AB_MPL_ND_Power", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(70) ipc.writeLvar("L:AB_MPL_ECAMU_Power", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(50) ipc.writeLvar("L:AB_MPL_ECAML_Power", 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- ECAM, PFDs, NDs, Radio off if ipcPARAM == 186 then ipc.writeLvar("L:AB_PDS_RADIO_POWER", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(50) ipc.writeLvar("L:AB_MPL_PFD_Power", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(100) ipc.writeLvar("L:AB_MPL_ND_Power", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(70) ipc.writeLvar("L:AB_MPL_ECAMU_Power", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) ipc.sleep(50) ipc.writeLvar("L:AB_MPL_ECAML_Power", 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------APU Bleed -- APU Bleed on if ipcPARAM == 190 then LVarSet = "L:AB_OVH_PNEUBLEEDAPU" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Bleed off if ipcPARAM == 191 then LVarSet = "L:AB_OVH_PNEUBLEEDAPU" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- APU Bleed toggle if ipcPARAM == 192 then LVarSet = "L:AB_OVH_PNEUBLEEDAPU" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------BAT1 -- Battery1 on if ipcPARAM == 200 then LVarSet = "L:AB_OVH_ELECBAT1" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery1 off if ipcPARAM == 201 then LVarSet = "L:AB_OVH_ELECBAT1" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery1 toggle if ipcPARAM == 202 then LVarSet = "L:AB_OVH_ELECBAT1" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------BAT2 -- Battery2 on if ipcPARAM == 203 then LVarSet = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery2 off if ipcPARAM == 204 then LVarSet = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery2 toggle if ipcPARAM == 205 then LVarSet = "L:AB_OVH_ELECBAT2" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end ---------------------------------------------------------BAT1+2 -- Battery1+2 on if ipcPARAM == 206 then LVarSet1 = "L:AB_OVH_ELECBAT1" LVarSet2 = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet1, 1) ipc.writeLvar(LVarSet2, 1) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery1+2 off if ipcPARAM == 207 then LVarSet1 = "L:AB_OVH_ELECBAT1" LVarSet2 = "L:AB_OVH_ELECBAT2" ipc.writeLvar(LVarSet1, 0) ipc.writeLvar(LVarSet2, 0) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end -- Battery1+2 toggle if ipcPARAM == 208 then LVarSet1 = "L:AB_OVH_ELECBAT1" LVarSet2 = "L:AB_OVH_ELECBAT2" val = 0 if ipc.readLvar(LVarSet1) == 0 then val = 1 end ipc.writeLvar(LVarSet1, val) ipc.writeLvar(LVarSet2, val) ipc.writeLvar("L:SmallOverheadPushButtons", 1) end --------------------------------------------------------------------------------------- LUA scripts for AirbusX throttle thanks to Pete we have now the possibility to assign the AirbusX throttles via FSUIPC I copy Petes "How-To" out of the last one posts: Try the following two Lua plug-ins: First this, saved as AirbusX_Thr1.lua: ipc.writeLvar("L:AS_FADEC_0", ipcPARAM*-2) And this, saved as AirbusX_Thr2.lua: ipc.writeLvar("L:AS_FADEC_1", ipcPARAM*-2) Save them in the FSX Modules folder. Then, in FSUIPC axis assignments, assign Throttle 1 to the so-called 'FS control' Lua AirbusX_Thr1, and similarly Throttle 2 to Lua AirbusX_Thr2. Note that you'll find these listed in the "Send to FS as normal axis" mode, NOT in the "Send direct to FSUIPC" mode. This is a quirk of how macros and plug-ins are recognised. I have tested this with my Saitek X52 and Saitek throttle quadrant and works perfect. But of course, other hardware could have problems, maybe. Even if I don't think so. Please try it out and feel free to report back! Thanks again and all credits to Pete Dowson! ---------------------------------- My FADEC Lua Script is obsolete, as this solution is much better! For historical research I will leave the code stay below :mrgreen: -- FADEC Aerosoft AirbusX -- LUA Script V 1.1 for Aerosoft FADEC -- Wednesday, the 8th of September, 2010 ;-) -- (C) Guenter Steiner/guenseli -- List of parameters -- -- -- 1 FADEC L and R zero -- 2 FADEC L zero -- 3 FADEC R zero -- zero means, throttle at idle -- -- -- 10 FADEC L and R taxi -- 11 FADEC L taxi -- 12 FADEC R taxi -- taxi means, throttle is a bit open, about 10%. no other possibility right now; you have to brake -- -- -- 20 FADEC L and R CLB -- 21 FADEC L CLB -- 22 FADEC R CLB -- CLB mode -- -- -- 30 FADEC L and R MCT -- 31 FADEC L MCT -- 32 FADEC R MCT -- MCT mode -- -- I have not sorted out FLX mode, will be updated if possible -- -- -- 50 FADEC L and R TOGA -- 51 FADEC L TOGA -- 52 FADEC R TOGA -- TOGA Mode -- -- FADEC----------- ----------------------------------FADEC zero -- FADEC L AND R if ipcPARAM == 1 then ipc.writeLvar("L:AS_FADEC_0", 32768) ipc.sleep(50) ipc.writeLvar("L:AS_FADEC_1", 32768) end -- FADEC L if ipcPARAM == 2 then ipc.writeLvar("L:AS_FADEC_0", 32768) end -- FADEC R if ipcPARAM == 3 then ipc.writeLvar("L:AS_FADEC_1", 32768) end ----------------------------------FADEC taxi -- FADEC L AND R if ipcPARAM == 10 then ipc.writeLvar("L:AS_FADEC_0", 17000) ipc.sleep(50) ipc.writeLvar("L:AS_FADEC_1", 17000) end -- FADEC L if ipcPARAM == 11 then ipc.writeLvar("L:AS_FADEC_0", 17000) end -- FADEC R if ipcPARAM == 12 then ipc.writeLvar("L:AS_FADEC_1", 17000) end ----------------------------------FADEC CLB -- FADEC L AND R if ipcPARAM == 20 then ipc.writeLvar("L:AS_FADEC_0", -7000) ipc.sleep(50) ipc.writeLvar("L:AS_FADEC_1", -7000) end -- FADEC L if ipcPARAM == 21 then ipc.writeLvar("L:AS_FADEC_0", -7000) end -- FADEC R if ipcPARAM == 22 then ipc.writeLvar("L:AS_FADEC_1", -7000) end ----------------------------------FADEC MCT -- FADEC L AND R if ipcPARAM == 30 then ipc.writeLvar("L:AS_FADEC_0", -14000) ipc.sleep(50) ipc.writeLvar("L:AS_FADEC_1", -14000) end -- FADEC L if ipcPARAM == 31 then ipc.writeLvar("L:AS_FADEC_0", -14000) end -- FADEC R if ipcPARAM == 32 then ipc.writeLvar("L:AS_FADEC_1", -14000) end ----------------------------------FADEC TOGA -- FADEC L AND R if ipcPARAM == 50 then ipc.writeLvar("L:AS_FADEC_0", -32000) ipc.writeLvar("L:AS_FADEC_1", -32000) ipc.control(65596) end -- FADEC L if ipcPARAM == 51 then ipc.writeLvar("L:AS_FADEC_0", -32000) ipc.control(65963) end -- FADEC R if ipcPARAM == 52 then ipc.writeLvar("L:AS_FADEC_1", -32000) ipc.control(65968) end
Pete Dowson Posted September 3, 2010 Report Posted September 3, 2010 I have written a LUA Script during Betatest because Finn from Aerosoft provided me nicely with the LUA Variables. Thanks for posting it here too. As you can see I've made it "stickie". Have you found any L:vars for throttle control? It seems this aircraft depends on FSX assignments then goes direct to DirectInput, so defeating any attempt to use FSUIPC throttles, or, worse, throttles which don't connect as DirectX joystick inputs (like PFC, for starters). Regards Pete
guenseli Posted September 3, 2010 Author Report Posted September 3, 2010 Pete, thanks for the sticky! I have sent you a mail! greetings, Günter
Pete Dowson Posted September 3, 2010 Report Posted September 3, 2010 I have sent you a mail! Oh, it hasn't arrived yet. Did you send it to petedowson@btconnect.com? Can you try again, please? I'm not back till Sunday nowTomorrow (Saturday) all day at Duxford for the Battle of Britain Air Show. ;-) Best Regards Pete
guenseli Posted September 4, 2010 Author Report Posted September 4, 2010 Have sent again, no need to hurry! Enjoy Duxford!!!
KAPTEJNLN Posted September 4, 2010 Report Posted September 4, 2010 hello Pete, well got back to lau programing but the altitude and heading and the other where you use dial on the goflight the lau comands cause fs to crash, could you tell if you know why you think it could be as it happens if you rotate the knob on the hardware for some time FS stops responding have tryeid to changes some of the lau code and worket better but stil crash. hope you enjoyed Duxford Best regards Lars
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 well got back to lau programing but the altitude and heading and the other where you use dial on the goflight the lau comands cause fs to crash Crash? what error report does it provide? There's nothing in Lua that I know of which can cause a crash unless you are running so many copies of a Lua thread that you exhaust the process stack. To do that you'd really have to try hard with some bad programming. You will need to supply more information if you want me to help you. Show me your Lua program and tell me exactly what you do to provoke the crash. And are you saying it is only with the AirbusX? Maybe it is a bug in the aircraft rather than in Lua? You can also use logging to get more information. Logging is always the best way to debug your programming. [LATER] After a pointer from Guenseli I found this extea information from a post you made in the Aerosoft Forum: update found that if you errase this line LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") in parameter 46 and 47 it woult take longer time before it crash in my last test it seems to work nearly default whit out that line also testet whot out the othere line and whit only LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") and it crashed after 1 or 2 rotates on the hardware. but how much better in flight it would be is un known but it to more time to get it crash only if i moved the know from sid to side fast it crash so it looks to be a good sign. Now what this implies to me is that the way the Lua program is instigated (by button repeats from the dial) is causing the Lua program to be Killed and re-Run each time, and the time it takes to do all this longer than the time between each repeat, so causing the number of simultaneous threads to grow until the process stack overflows. This causes a crash or hang, inevitably. I did take steps in FSUIPC to avoid normal repeats from starting a Lua whilst the same one was still running, but that only applied to regular repeats, as from a button or keypress being held down. The rotaries don't look like repeats because what they do is send on/off pulses alternately. This sort of problem hasn't arisen before now because: (a) the pulse rate of rotaries is actually quite low compared to button and key repeat rates, and (b) most if not all Lua plug-ins used have been very short and fast to load and kill. The Lua program Guenseli has put together is very long indeed, especially for one which is destined to be loaded and run frequently. Each time it is instigated it is being assigned a thread, and memory, compiled and then executed -- and all those "if " commands it has to go through to find the correct action also makes it worse. I will look at the Lua section in FSUIPC to see if I can detect the conditions arising in which such a crash can occur, and prevent it from happening. I think I'd have to do this by starting a timer when I kill a thread and not allow the same one to be started again for a number of milliseconds thereafter. I might need to make that adjustable. It will inevitable slow down the maximum rate Lua threads can be restarted. There might be alternatives, like aborting the thread execution and merely restarting it. This obviously would be more efficient, but I'm not sure I can do that with the Lua interpreter code. I'll take a look. Meanwhile you can try something yourself. Instead of using the one big script for the rotary programming, extract the part of the Lua code which does what you want, and have separate little Lua plug-ins for each one, assigning them directly instead of via a parameter number. For example, instead of the part: -- Altitude rate selection slow (100) if ipcPARAM == 41 then LVarSet = "L:AB_AP_ALTSTEP" ipc.writeLvar(LVarSet, 0) end in the large Lua plug-in, just have a plug-in, called, say "AltrateSlow.lua", containing just: ipc.writeLvar("L:AB_AP_ALTSTEP", 0) then assign your rotary button to "Lua AltrateSlow". If I get anywhere with a crash prevention modification to FSUIPC I'll let you know. Regards Pete
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well think you are right it might bee that you are talking about after line as would be as start and stop all the time seems to get a to big load. update now i tryeid the push buttons and worked after restart crashed after it was set up but now it seems to work noticed that then i have set the hold funktion (only to push buttons) it rotates and stops randomly and think it would stop working loke dial but after a few sek it could continue to work. mabee that cause rotation dosent work as it dosent stop like buttons would now try your last part
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 would now try your last part Of course it probably was not the parameter 41 entry you really need to separate -- only those you want to assign to the Rotaries, like -- 46 ALT inc slow or fast -- 47 ALT dec slow or fast -- 48 ALT inc slow (100) -- 49 ALT inc fast (1000) -- 50 ALT dec slow (100) -- 51 ALT dec fast (1000) To take 46 as an example, instead of this in the large Lua: -- ALT inc if ipcPARAM == 46 then LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" if LVarALT == 0 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+100) elseif LVarALT == 1 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1000) end end the free-standing version could be: LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" if LVarALT == 0 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+100) elseif LVarALT == 1 then LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+1000) end though, assuming "L:AB_AP_ALTSTEP" is either zero or not-zero, slightly more efficiently as: LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) if LVarALT == 0 then ipc.writeLvar(LVarSet, LVarGet+100) else ipc.writeLvar(LVarSet, LVarGet+1000) end Meanwhile, I've looked at the possibility of just restarting Lua plug-ins instead of Killing and re-creating their threads, and there are too many complications. I'd need to take care to re-initialise everything as if it were a fresh thread even though it is not. With the possibility of COM devices, Networking handles and the like it is very messy, and I don't like a partial solution. So for now I'm going with the delay -- not allowing a re-run of a particular Lua plug-in within so many milliseconds of its last start. I'll allow the delay to be adjustable in the FSUIPC INI file, and default it to, say, 50 mSecs to allow up to 20 repeats per second. I'll try various things and may revise that downwards depending what I find. Regards Pete
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 I'll allow the delay to be adjustable in the FSUIPC INI file, and default it to, say, 50 mSecs to allow up to 20 repeats per second. I'll try various things and may revise that downwards depending what I find. Well, I've been trying GoFlight rotaries programmed to use Guenseli's original Lua, and I can't even get the rotaries sending pulses fast enough to get FSUIPC's Lua manager to even need to Kill the previous thread -- it has always finished by the time the next pulse from the rotary arrives. So, either your PC is rather slow, or overloaded, and the Lua loading itself is taking a lot longer than on my system, or it is somehow peculiarly related to the AirbusX itself rather than anything I'm doing. Tomorrow I'll supply an FSUIPC4 update which does limit the repeat rate, using an adjustable delay, but it may be that this needs investigating with this specific aircraft rather than generally as I have been doing. Regards Pete
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well saidly both of the lau codes caused an faster not responding. here is the log ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 135362 System time = 05/09/2010 14:46:17, Simulator time = 19:12:07 (02:12Z) 135362 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135440 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135440 System time = 05/09/2010 14:46:17, Simulator time = 19:12:07 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 135502 System time = 05/09/2010 14:46:17, Simulator time = 19:12:07 (02:12Z) 135502 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135580 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135580 System time = 05/09/2010 14:46:17, Simulator time = 19:12:08 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 135721 System time = 05/09/2010 14:46:17, Simulator time = 19:12:08 (02:12Z) 135721 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135783 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 135783 System time = 05/09/2010 14:46:17, Simulator time = 19:12:08 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 149683 System time = 05/09/2010 14:46:31, Simulator time = 19:12:22 (02:12Z) 149683 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 149729 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 149729 System time = 05/09/2010 14:46:31, Simulator time = 19:12:22 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 149776 System time = 05/09/2010 14:46:31, Simulator time = 19:12:22 (02:12Z) 149776 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 149854 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 149854 System time = 05/09/2010 14:46:31, Simulator time = 19:12:22 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 150806 System time = 05/09/2010 14:46:32, Simulator time = 19:12:23 (02:12Z) 150806 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 150868 >>> Thread killed <<< 150868 System time = 05/09/2010 14:46:32, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 150884 System time = 05/09/2010 14:46:32, Simulator time = 19:12:23 (02:12Z) 150884 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 150931 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 150931 System time = 05/09/2010 14:46:32, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 151024 System time = 05/09/2010 14:46:32, Simulator time = 19:12:23 (02:12Z) 151024 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151071 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151071 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 151165 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) 151165 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151211 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151211 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 151352 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) 151352 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151414 >>> Thread killed <<< 151414 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 151414 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) 151414 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151461 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 151461 System time = 05/09/2010 14:46:33, Simulator time = 19:12:23 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 152319 System time = 05/09/2010 14:46:34, Simulator time = 19:12:24 (02:12Z) 152319 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152381 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152381 System time = 05/09/2010 14:46:34, Simulator time = 19:12:24 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 152553 System time = 05/09/2010 14:46:34, Simulator time = 19:12:25 (02:12Z) 152553 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152600 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152600 System time = 05/09/2010 14:46:34, Simulator time = 19:12:25 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 152881 System time = 05/09/2010 14:46:34, Simulator time = 19:12:25 (02:12Z) 152881 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152943 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 152943 System time = 05/09/2010 14:46:34, Simulator time = 19:12:25 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 153161 System time = 05/09/2010 14:46:35, Simulator time = 19:12:25 (02:12Z) 153161 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 153224 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 153224 System time = 05/09/2010 14:46:35, Simulator time = 19:12:25 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 153442 System time = 05/09/2010 14:46:35, Simulator time = 19:12:25 (02:12Z) 153442 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 153505 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 153505 System time = 05/09/2010 14:46:35, Simulator time = 19:12:25 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154363 System time = 05/09/2010 14:46:36, Simulator time = 19:12:26 (02:12Z) 154363 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154441 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154441 System time = 05/09/2010 14:46:36, Simulator time = 19:12:26 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154565 System time = 05/09/2010 14:46:36, Simulator time = 19:12:27 (02:12Z) 154565 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154643 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154643 System time = 05/09/2010 14:46:36, Simulator time = 19:12:27 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154831 System time = 05/09/2010 14:46:36, Simulator time = 19:12:27 (02:12Z) 154831 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154893 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154893 System time = 05/09/2010 14:46:36, Simulator time = 19:12:27 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 155065 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) 155065 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155111 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155111 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 155174 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) 155174 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155189 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155189 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 155283 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) 155283 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155345 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155345 System time = 05/09/2010 14:46:37, Simulator time = 19:12:27 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156079 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) 156079 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156125 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156125 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156141 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) 156141 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156203 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156203 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156297 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) 156297 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156359 >>> Thread killed <<< 156359 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156359 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) 156359 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156422 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156422 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156453 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) 156453 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156500 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156500 System time = 05/09/2010 14:46:38, Simulator time = 19:12:28 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156547 System time = 05/09/2010 14:46:38, Simulator time = 19:12:29 (02:12Z) 156547 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156593 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156593 System time = 05/09/2010 14:46:38, Simulator time = 19:12:29 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 156656 System time = 05/09/2010 14:46:38, Simulator time = 19:12:29 (02:12Z) 156656 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156703 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 156703 System time = 05/09/2010 14:46:38, Simulator time = 19:12:29 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 157763 System time = 05/09/2010 14:46:39, Simulator time = 19:12:30 (02:12Z) 157763 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 157795 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 157795 System time = 05/09/2010 14:46:39, Simulator time = 19:12:30 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 158621 System time = 05/09/2010 14:46:40, Simulator time = 19:12:31 (02:12Z) 158621 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 158684 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 158684 System time = 05/09/2010 14:46:40, Simulator time = 19:12:31 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165205 System time = 05/09/2010 14:46:47, Simulator time = 19:12:37 (02:12Z) 165205 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165252 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165252 System time = 05/09/2010 14:46:47, Simulator time = 19:12:37 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165454 System time = 05/09/2010 14:46:47, Simulator time = 19:12:37 (02:12Z) 165454 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165501 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165501 System time = 05/09/2010 14:46:47, Simulator time = 19:12:37 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165610 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) 165610 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165673 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165673 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165751 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) 165751 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165813 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165813 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165844 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) 165844 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165922 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 165922 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 165954 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) 165954 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166000 >>> Thread killed <<< 166000 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 166016 System time = 05/09/2010 14:46:47, Simulator time = 19:12:38 (02:12Z) 166016 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166063 >>> Thread killed <<< 166063 System time = 05/09/2010 14:46:48, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 166078 System time = 05/09/2010 14:46:48, Simulator time = 19:12:38 (02:12Z) 166078 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166125 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166125 System time = 05/09/2010 14:46:48, Simulator time = 19:12:38 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 166671 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) 166671 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166749 >>> Thread killed <<< 166749 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 166780 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) 166780 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166843 >>> Thread killed <<< 166843 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 166858 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) 166858 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166921 >>> Thread killed <<< 166921 System time = 05/09/2010 14:46:48, Simulator time = 19:12:39 (02:12Z) ********* LUA execution terminated: Log Closed *********
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 well saidly both of the lau codes caused an faster not responding. here is the log That shows over 30 seconds of turning the knob -- how long do you sit there turning it for normally, then? Very strange. There aren't actually all that many instances of the thread having to be "Killed", but tellingly the last few are. The timings of those killings are interesting: 166671 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua"166749 >>> Thread killed <<< 166780 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166843 >>> Thread killed <<< 166858 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 166921 >>> Thread killed <<< That's 78 mSecs, 63 mSecs and 63 mSecs, respectively -- all over the 50 mSecs I was considering putting in as the limit. Seems, for your system, which is evidently performing quite poorly, you'd need a delay of more like 100 mSecs to be safe. This would limit it to 10 repeats per second. I suppose that should be enough, though. I don't have the AirbusX at present, but I might get it just to see if the problem is specific to they way it is working. Regards Pete
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well only normal rotation speed fast as in fsx default could handel. could try to do it slow to see. Update log slow: ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154379 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154379 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154441 >>> Thread killed <<< 154441 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154457 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154457 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154519 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154519 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154566 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154566 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154644 >>> Thread killed <<< 154644 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154659 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154659 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154722 >>> Thread killed <<< 154722 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154737 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154737 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154800 >>> Thread killed <<< 154800 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154815 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154815 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154831 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154831 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154878 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154878 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 154971 >>> Thread killed <<< 154971 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 154971 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 154971 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155049 >>> Thread killed <<< 155049 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 155065 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) 155065 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155143 LUA: ended "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155143 System time = 05/09/2010 15:29:21, Simulator time = 19:13:16 (02:13Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "AltrateSlow" Log [from FSUIPC version 4.60a] ********* 155393 System time = 05/09/2010 15:29:22, Simulator time = 19:13:17 (02:13Z) 155393 LUA: beginning "C:\Program Files (x86)\SPIL\Modules\AltrateSlow.lua" 155471 >>> Thread killed <<< 155471 System time = 05/09/2010 15:29:22, Simulator time = 19:13:17 (02:13Z) ********* LUA execution terminated: Log Closed *********
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 well only normal rotation speed fast as in fsx default could handel. could try to do it slow to see. All this shows is your system is so much slower that the one i'm testing on, and/or heavily overloaded. It still needs 100 mSecs delay, not the 50 I envisaged. My system needs no delay, but i don't have the AirbusX (yet). Odd that no one else has reported similar problems. Pete
guenseli Posted September 5, 2010 Author Report Posted September 5, 2010 Lars, one idea comes to my mind: try to insert a delay into your LUA file (or lau file if you prefer that spelling :mrgreen: ) example: if ipcPARAM == 48 then LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) ipc.writeLvar(LVarSet, LVarGet+100) ipc.sleep(100) end ipc.sleep(100) means theres a 100 millisecond pause. you can play around with it; try maybe also 10 or 50 milliseconds...or more e.g. 200...? of course you have to insert that in every command which you are using your rotary switches... 49, 50 etc
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well over loaded there is also many things happening when airbus x runs here is a exampel from i was flyeing but not tuch any buttons then see how much there happens as default it shows axes running when default plane but here it is a very short as manny and goe on and on taken from the fsuipc log file: 299101 *** EVENT: Cntrl= 66124 (0x0001024c), Param= 100 (0x00000064) AP_ALT_VAR_SET_ENGLISH 299101 *** EVENT: Cntrl= 66036 (0x000101f4), Param= -1800 (0xfffff8f8) AP_VS_VAR_SET_ENGLISH 299101 *** EVENT: Cntrl= 65811 (0x00010113), Param= 0 (0x00000000) AP_NAV1_HOLD_ON 299148 *** EVENT: Cntrl= 66093 (0x0001022d), Param= 0 (0x00000000) AP_AIRSPEED_ON 299148 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 198 (0x000000c6) HEADING_BUG_SET 299148 *** EVENT: Cntrl= 65808 (0x00010110), Param= 0 (0x00000000) AP_ALT_HOLD_ON 299148 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 203 (0x000000cb) HEADING_BUG_SET 299148 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 203 (0x000000cb) HEADING_BUG_SET 299148 *** EVENT: Cntrl= 66124 (0x0001024c), Param= 100 (0x00000064) AP_ALT_VAR_SET_ENGLISH 299148 *** EVENT: Cntrl= 66036 (0x000101f4), Param= -1800 (0xfffff8f8) AP_VS_VAR_SET_ENGLISH 299148 *** EVENT: Cntrl= 65811 (0x00010113), Param= 0 (0x00000000) AP_NAV1_HOLD_ON 299210 *** EVENT: Cntrl= 66093 (0x0001022d), Param= 0 (0x00000000) AP_AIRSPEED_ON 299210 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 198 (0x000000c6) HEADING_BUG_SET 299210 *** EVENT: Cntrl= 65808 (0x00010110), Param= 0 (0x00000000) AP_ALT_HOLD_ON 299210 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 203 (0x000000cb) HEADING_BUG_SET 299210 *** EVENT: Cntrl= 66124 (0x0001024c), Param= 100 (0x00000064) AP_ALT_VAR_SET_ENGLISH 299210 *** EVENT: Cntrl= 66036 (0x000101f4), Param= -1800 (0xfffff8f8) AP_VS_VAR_SET_ENGLISH 299210 *** EVENT: Cntrl= 65811 (0x00010113), Param= 0 (0x00000000) AP_NAV1_HOLD_ON 299210 *** EVENT: Cntrl= 66705 (0x00010491), Param= 0 (0x00000000) APU_OFF_SWITCH 299210 *** EVENT: Cntrl= 66053 (0x00010205), Param= 0 (0x00000000) STROBES_OFF 299257 *** EVENT: Cntrl= 66093 (0x0001022d), Param= 0 (0x00000000) AP_AIRSPEED_ON 299257 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 198 (0x000000c6) HEADING_BUG_SET 299257 *** EVENT: Cntrl= 65808 (0x00010110), Param= 0 (0x00000000) AP_ALT_HOLD_ON 299257 *** EVENT: Cntrl= 66042 (0x000101fa), Param= 203 (0x000000cb) HEADING_BUG_SET 299257 *** EVENT: Cntrl= 66124 (0x0001024c), Param= 100 (0x00000064) AP_ALT_VAR_SET_ENGLISH 299257 *** EVENT: Cntrl= 66036 (0x000101f4), Param= -1800 (0xfffff8f8) AP_VS_VAR_SET_ENGLISH 299257 *** EVENT: Cntrl= 65811 (0x00010113), Param= 0 (0x00000000) AP_NAV1_HOLD_ON 299257 *** EVENT: Cntrl= 65957 (0x000101a5), Param= 1 (0x00000001) FUEL_SELECTOR_LEFT 299257 *** EVENT: Cntrl= 66519 (0x000103d7), Param= 1 (0x00000001) FUEL_SELECTOR_2_RIGHT and this is the only one i have problems whit at this moment, but also the only whit lau programing.
guenseli Posted September 5, 2010 Author Report Posted September 5, 2010 Thats normal for nearly every bit more complex aircraft... has nothing to do with a general overload. Is here also!
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 Well tryeid to the valv given from pete and you new vaulve but dident work, would try it whit your file now.
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 one idea comes to my mind: try to insert a delay into your LUA file If that helps then the problem he is getting must be due to the coding in the aircraft, not in the Lua execution, because doing that actually makes the Killing and resurrection of Lua threads more likely, not less -- there's more chance it will still be running when the next rotary repetition comes in and FSUIPC has to run the Lua plug-in again. Regards Pete
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well it also dident work not even whit 200,by the way whit 200 delay it then does a bit like push button before restart after i have set it up in fsuipc but in the end it still stoped working like push buttons. but i found that if i set it up as rotate a button and it starts goeing up the altitude then turn it again it stops as it should but so far it dosent caus it stop working. update now it stoped working to as i was first try to get higher altitude then i get to high i had to go the otherway. well it is so hard best you think you got it working then awhile after nope it dosent :-( Update seems to work whit the code from you pete and whit delay: LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) if LVarALT == 0 then ipc.writeLvar(LVarSet, LVarGet+100) ipc.sleep(200) else ipc.writeLvar(LVarSet, LVarGet+1000) ipc.sleep(200) end but only whit it set up like before see picture. but then have a problem to set altitude if 100 wrong but think i would try to set it only for 1000 as it is most used in ifr flight. but for how long before it shuts down i would try it out for some time. but then it also dosent open and close files as ofthen then lower load. by the way it would then be a problem at hdg and spd
KAPTEJNLN Posted September 5, 2010 Report Posted September 5, 2010 well also seems to work that way as discribed above if i remove the delay (ipc.sleep(200)) as it dosent seems to be that there keeps it running. but the lower amuond of the on off effect. Update well think i got the altitude working finaly as testet it in add on airport where it seemed normaly to get faster shut down. but i tryeid after restart and all that and turned the knob more then you would do normaly and it keept running. So here it is would update it later on aerosoft forum and here when or if i could get the other spd and so on working to. tryeid to continue whit the only on comand per lau file so now it have the normal fast and slow funktion slow in hundrets and fast in thousands lau file:AltrateFAST LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) if LVarALT == 0 then ipc.writeLvar(LVarSet, LVarGet+1000) end lau file:AltrateSlow LVarALT = ipc.readLvar("L:AB_AP_ALTSTEP") LVarSet = "L:AB_AP_ALT_Select" LVarGet = ipc.readLvar(LVarSet) if LVarALT == 0 then ipc.writeLvar(LVarSet, LVarGet+100) end Then just set slow to slow on gf and fast to fast and it works. (just to show how i got it working :-) By the way pete isent there an option to send data to the gf display on autopilot only? as i know you have been talking about gf driver or program it from the begining. as it first update the gf display when pressing ingage the altitude. becaus it dosen work as the md80 where if i just pressed an button and flight director was on it keept updating gf display. !!Update heading also work but have problems whit the speed as it dosent even work whit the lau code from guenseli also not if i used push buttons so.... dont know as not much into the names and so..
Pete Dowson Posted September 5, 2010 Report Posted September 5, 2010 By the way pete isent there an option to send data to the gf display on autopilot only? You can use the Lua gfd library to send stuff to GoFlight displays. It's up to you to program whether it only does this when the autopilot is enabled. as i know you have been talking about gf driver or program it from the begining. as it first update the gf display when pressing ingage the altitude. becaus it dosen work as the md80 where if i just pressed an button and flight director was on it keept updating gf display.!!Update heading also work but have problems whit the speed as it dosent even work whit the lau code from guenseli also not if i used push buttons so.... dont know as not much into the names and so.. Sorry, I don't understand any of that. In fact, reading back a lot, I think i might have been misunderstanding much of what you are trying to say. What is your native language? Do you think you might be able to write in your native language and get it translated into English by someone else, or maybe a good translation program? I think we might understand more then. Pete
KAPTEJNLN Posted September 6, 2010 Report Posted September 6, 2010 sorry my english! well think i know what caused the stop responding was: LVarSPD = ipc.readLvar("L:AB_AP_SPDMACH") and all the other ones, because after i changesed it to LVarSPD = ipc.readLvar("L:AB_AP_SPDSTEP") and so on for the others, then it stoped crashing, so think it was the main problem. as now my comands work even if you turn it very fast to both sides and it keeps running also then i used all of them fast once it works. so mabee i just have to try changes it in the data from guenseli. but now it seems to work as it should. so soon i would up load it...
guenseli Posted September 6, 2010 Author Report Posted September 6, 2010 where do you have the Variable "L:AB_AP_SPDSTEP" from? As far as I know this variable does not exist...? Are you still able to set your SPD?
Pete Dowson Posted September 6, 2010 Report Posted September 6, 2010 FSUIPC 4.626, now available in the Updates Announcement, includes the timeout precaution I mentioned. I've set the default time to 66 mSecs, so Lua plug-ins are only killed off to be restarted if they take longer than that to execute. From the sound of the more recent reports here this won't actually help, because it looks like the problem is in the AirbusX. However, please update. Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now