Jump to content
The simFlight Network Forums

guenseli

Moderators
  • Posts

    464
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by guenseli

  1. LUA script for the famous A2A Accusim Spifire. -- List of parameters -- -- 1 Generator on -- 2 Generator off -- 3 Generator Toggle -- -- 4 Primerstate open -- 5 Primerstate closed -- 6 Primerstate toggle -- 7 Priming -- 8 Primer releasing and priming -- -- 9 open Lid and starter ON -- 10 starter OFF and close Lid -- -- 15 Boost cut out off -- 16 Boost cut out on -- 17 Boost cut out toggle -- -- 20 Mixture ratio lever weak -- 21 Mixture ratio lever rich -- 22 Mixture ratio lever toggle -- -- 23 Top (Left) Fuel Selector ON -- 24 Top (Left) Fuel Selector OFF -- 25 Top (Left) Fuel Selector toggle -- -- 26 Bottom (right) Fuel Selector ON -- 27 Bottom (right) Fuel Selector Off -- 28 Bottom (right) Fuel Selector toggle -- -- 30 Ventral recog light "Beacon" steady -- 31 Ventral recog light "Beacon" OFF -- 32 Ventral recog light "Beacon" morse -- -- 33 dorsal recog light steady -- 34 dorsal recog light OFF -- 35 dorsal recog light morse -- -- 36 morse key -- 37 morse key on -- 38 morse key off -- -- 40 Landing light extending -- 41 Landing light retracting -- 42 Landing light ext/retr toggle -- -- 43 Left Landing light ON -- 44 Left Landing light OFF -- 45 Right Landing light ON -- 46 Right Landing light OFF -- -- 50 Left Landing light extend and ON -- 51 Left Landing light retract and OFF -- 52 right Landing light extend and ON -- 53 right Landing light retract and OFF -- -- 55 LL Beam up -- 56 LL Beam down -- -- 60 Defroster inc -- 61 Defroster dec -- -- 62 Gunsight ON -- 63 Gunsight OFF -- 64 Gunsight Toggle -- -- 70 Oxy Alt Valve set inc -- 71 Oxy Alt Valve set dec -- 72 Oxymask and valve on/open -- 73 Oxymask and valve off/closed -- -- 80 Bottom Tank Fuel state (for 5 seconds) -- 81 Bottom Tank Fuel state ON (for ON/OFF toggle switches) -- 82 Bottom Tank Fuel state OFF (for ON/OFF toggle switches) -- -- 83 top Tank Fuel state (for 5 seconds) -- 84 top Tank Fuel state ON (for ON/OFF toggle switches) -- 85 top Tank Fuel state OFF (for ON/OFF toggle switches) -- -- 90 Engine cut out on -- 91 Engine cut out off -- 92 Engine cut out toggle -- -- 95 Engine cartridge reload switch or starting magneto (depends on model) -- --100 APU on --101 APU ott --102 APU toggle -- -- 105 Cabin Vent inc -- 106 Cabin Vent dec -- -- 110 Landing gear silencer switch Have fun! -- A2A Spitfire accusim -- LUA Script V 1.0 -- updated: Sunday, 24th Oct -- -- (C) Guenter Steiner/guenseli -- List of parameters -- -- 1 Generator on -- 2 Generator off -- 3 Generator Toggle -- -- 4 Primerstate open -- 5 Primerstate closed -- 6 Primerstate toggle -- 7 Priming -- 8 Primer releasing and priming -- -- 9 open Lid and starter ON -- 10 starter OFF and close Lid -- -- 15 Boost cut out off -- 16 Boost cut out on -- 17 Boost cut out toggle -- -- 20 Mixture ratio lever weak -- 21 Mixture ratio lever rich -- 22 Mixture ratio lever toggle -- -- 23 Top (Left) Fuel Selector ON -- 24 Top (Left) Fuel Selector OFF -- 25 Top (Left) Fuel Selector toggle -- -- 26 Bottom (right) Fuel Selector ON -- 27 Bottom (right) Fuel Selector Off -- 28 Bottom (right) Fuel Selector toggle -- -- 30 Ventral recog light "Beacon" steady -- 31 Ventral recog light "Beacon" OFF -- 32 Ventral recog light "Beacon" morse -- -- 33 dorsal recog light steady -- 34 dorsal recog light OFF -- 35 dorsal recog light morse -- -- 36 morse key -- 37 morse key on -- 38 morse key off -- -- 40 Landing light extending -- 41 Landing light retracting -- 42 Landing light ext/retr toggle -- -- 43 Left Landing light ON -- 44 Left Landing light OFF -- 45 Right Landing light ON -- 46 Right Landing light OFF -- -- 50 Left Landing light extend and ON -- 51 Left Landing light retract and OFF -- 52 right Landing light extend and ON -- 53 right Landing light retract and OFF -- -- 55 LL Beam up -- 56 LL Beam down -- -- 60 Defroster inc -- 61 Defroster dec -- -- 62 Gunsight ON -- 63 Gunsight OFF -- 64 Gunsight Toggle -- -- 70 Oxy Alt Valve set inc -- 71 Oxy Alt Valve set dec -- 72 Oxymask and valve on/open -- 73 Oxymask and valve off/closed -- -- 80 Bottom Tank Fuel state (for 5 seconds) -- 81 Bottom Tank Fuel state ON (for ON/OFF toggle switches) -- 82 Bottom Tank Fuel state OFF (for ON/OFF toggle switches) -- -- 83 top Tank Fuel state (for 5 seconds) -- 84 top Tank Fuel state ON (for ON/OFF toggle switches) -- 85 top Tank Fuel state OFF (for ON/OFF toggle switches) -- -- 90 Engine cut out on -- 91 Engine cut out off -- 92 Engine cut out toggle -- -- 95 Engine cartridge reload switch or starting magneto (depends on model) -- --100 APU on --101 APU ott --102 APU toggle -- -- 105 Cabin Vent inc -- 106 Cabin Vent dec -- -- 110 Landing gear silencer switch -------------------------------------------------------------- GEN -- Generator ON if ipcPARAM == 1 then LVarSet = "L:Eng1_GeneratorSwitch" ipc.writeLvar(LVarSet, 1) end -- Generator off if ipcPARAM == 2 then LVarSet = "L:Eng1_GeneratorSwitch" ipc.writeLvar(LVarSet, 0) end -- Generator toggle if ipcPARAM == 3 then LVarSet = "L:Eng1_GeneratorSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- Primer -- Primerstate open if ipcPARAM == 4 then LVarSet = "L:PrimerState" ipc.writeLvar(LVarSet, 1) end -- Primerstate closed if ipcPARAM == 5 then LVarSet = "L:PrimerState" ipc.writeLvar(LVarSet, 0) end -- Primerstate toggle if ipcPARAM == 6 then LVarSet = "L:PrimerState" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -- Priming if ipcPARAM == 7 then LVarSet = "L:PrimerState" ipc.writeLvar(LVarSet, 2) end -- Primer releasing and priming if ipcPARAM == 8 then LVarSet = "L:PrimerState" if ipc.readLvar(LVarSet) == 0 then ipc.writeLvar(LVarSet, 1) ipc.sleep(1300) end ipc.writeLvar(LVarSet, 2) end -------------------------------------------------------------- Starter -- open Lid and starter ON if ipcPARAM == 9 then ipc.writeLvar("L:Eng1StarterSwitchLid", 1) ipc.sleep(200) ipc.writeLvar("L:Eng1StarterSwitch", 1) end -- starter OFF and close Lid if ipcPARAM == 10 then ipc.writeLvar("L:Eng1StarterSwitch", 0) ipc.sleep(500) ipc.writeLvar("L:Eng1StarterSwitchLid", 0) end -------------------------------------------------------------- Boost Cut out -- Boost cut out off if ipcPARAM == 15 then LVarSet = "L:BoostCutout" ipc.writeLvar(LVarSet, 1) end -- Boost cut out on if ipcPARAM == 16 then LVarSet = "L:BoostCutout" ipc.writeLvar(LVarSet, 0) end -- Boost cut out toggle if ipcPARAM == 17 then LVarSet = "L:BoostCutout" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- Mixture -- Mixture ratio lever weak if ipcPARAM == 20 then LVarSet = "L:MixtureRatioLever1Position" ipc.writeLvar(LVarSet, 1) end -- Mixture ratio lever rich if ipcPARAM == 21 then LVarSet = "L:MixtureRatioLever1Position" ipc.writeLvar(LVarSet, 0) end -- Mixture ratio lever toggle if ipcPARAM == 22 then LVarSet = "L:MixtureRatioLever1Position" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- Fuel Selectors -- Top (Left) Fuel Selector ON if ipcPARAM == 23 then LVarSet = "L:FuelSelTop" ipc.writeLvar(LVarSet, 1) end -- Top (Left) Fuel Selector off if ipcPARAM == 24 then LVarSet = "L:FuelSelTop" ipc.writeLvar(LVarSet, 0) end -- Top (Left) Fuel Selector toggle if ipcPARAM == 25 then LVarSet = "L:FuelSelTop" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------- -- Bottom (right) Fuel Selector ON if ipcPARAM == 26 then LVarSet = "L:FuelSelBott" ipc.writeLvar(LVarSet, 1) end -- Bottom (right) Fuel Selector off if ipcPARAM == 27 then LVarSet = "L:FuelSelBott" ipc.writeLvar(LVarSet, 0) end -- Bottom (right) Fuel Selector toggle if ipcPARAM == 28 then LVarSet = "L:FuelSelBott" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- lights -- Ventral recog light "Beacon" steady if ipcPARAM == 30 then LVarSet = "L:LightRecogVentralSwitch" ipc.writeLvar(LVarSet, 0) end -- Ventral recog light "Beacon" off if ipcPARAM == 31 then LVarSet = "L:LightRecogVentralSwitch" ipc.writeLvar(LVarSet, 1) end -- Ventral recog light "Beacon" morse if ipcPARAM == 32 then LVarSet = "L:LightRecogVentralSwitch" ipc.writeLvar(LVarSet, 2) end ---------------------------------------------- -- dorsal recog light steady if ipcPARAM == 33 then LVarSet = "L:LightRecogDorsalSwitch" ipc.writeLvar(LVarSet, 0) end -- dorsal recog light off if ipcPARAM == 34 then LVarSet = "L:LightRecogDorsalSwitch" ipc.writeLvar(LVarSet, 1) end -- dorsal recog light morse if ipcPARAM == 35 then LVarSet = "L:LightRecogDorsalSwitch" ipc.writeLvar(LVarSet, 2) end ---------------------------------------------- morse -- morse key if ipcPARAM == 36 then LVarSet = "L:KeyMorseArm" ipc.writeLvar(LVarSet, 1) ipc.sleep(100) ipc.writeLvar(LVarSet, 0) end -- morse key on if ipcPARAM == 37 then LVarSet = "L:KeyMorseArm" ipc.writeLvar(LVarSet, 1) end -- morse key off if ipcPARAM == 38 then LVarSet = "L:KeyMorseArm" ipc.writeLvar(LVarSet, 0) end ---------------------------------------------- -- Landing light extending if ipcPARAM == 40 then LVarSet = "L:LandingLightExtendSwitch" ipc.writeLvar(LVarSet, 1) end -- Landing light retracting if ipcPARAM == 41 then LVarSet = "L:LandingLightExtendSwitch" ipc.writeLvar(LVarSet, 0) end -- Landing light ext/retr toggle if ipcPARAM == 42 then LVarSet = "L:LandingLightExtendSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end ---------------------------------------------- -- Left Landing light ON if ipcPARAM == 43 then LVarSet = "L:LandingLightSwitch" ipc.writeLvar(LVarSet, 0) end -- Left Landing light OFF if ipcPARAM == 44 then LVarSet = "L:LandingLightSwitch" ipc.writeLvar(LVarSet, 1) end -- Right Landing light ON if ipcPARAM == 45 then LVarSet = "L:LandingLightSwitch" ipc.writeLvar(LVarSet, 2) end -- Right Landing light OFF if ipcPARAM == 46 then LVarSet = "L:LandingLightSwitch" ipc.writeLvar(LVarSet, 1) end ---------------------------------------------- -- Left Landing light extend and ON if ipcPARAM == 50 then ipc.writeLvar("L:LandingLightExtendSwitch", 1) ipc.sleep(100) ipc.writeLvar("L:LandingLightSwitch", 0) end -- left Landing light retract and OFF if ipcPARAM == 51 then ipc.writeLvar("L:LandingLightSwitch", 1) ipc.sleep(100) ipc.writeLvar("L:LandingLightExtendSwitch", 0) end -- right Landing light extend and ON if ipcPARAM == 52 then ipc.writeLvar("L:LandingLightExtendSwitch", 1) ipc.sleep(100) ipc.writeLvar("L:LandingLightSwitch", 2) end -- right Landing light retract and OFF if ipcPARAM == 53 then ipc.writeLvar("L:LandingLightSwitch", 1) ipc.sleep(100) ipc.writeLvar("L:LandingLightExtendSwitch", 0) end ---------------------------------------- -- LL Beam up if ipcPARAM == 55 then LLBeam = "L:LeverLandingLightBeam" Var = ipc.readLvar(LLBeam) if Var < 100 then Var = Var + 1 ipc.sleep(1) end ipc.writeLvar(LLBeam, Var) end -- LL Beam down if ipcPARAM == 56 then LLBeam = "L:LeverLandingLightBeam" Var = ipc.readLvar(LLBeam) if Var > 0 then Var = Var - 1 ipc.sleep(1) end ipc.writeLvar(LLBeam, Var) end -------------------------------------------------------------- Defroster -- defroster inc if ipcPARAM == 60 then Def = "L:WindowDefrosterSwitch" ipc.writeLvar(Def, 1) end -- defroster inc --if ipcPARAM == 60 then -- Def = "L:WindowDefrosterControlKnob" -- Var = ipc.readLvar(Def) -- if Var < 100 then -- Var = Var + 10 -- ipc.sleep(1) -- end -- ipc.writeLvar(Def, Var) --end -- defroster dec if ipcPARAM == 61 then Def = "L:WindowDefrosterSwitch" ipc.writeLvar(Def, 0) end -------------------------------------------------------------- Gunsight switch -- Gunsight ON if ipcPARAM == 62 then LVarSet = "L:GunSightSwitchOn" ipc.writeLvar(LVarSet, 1) end -- Gunsight off if ipcPARAM == 63 then LVarSet = "L:GunSightSwitchOn" ipc.writeLvar(LVarSet, 0) end -- Gunsight toggle if ipcPARAM == 64 then LVarSet = "L:GunSightSwitchOn" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- oxygen -- oxy alt set inc if ipcPARAM == 70 then Oxy = "L:OxyAltSetValve" Var = ipc.readLvar(Oxy) if Var < 100 then Var = Var + 1 ipc.sleep(1) end ipc.writeLvar(Oxy, Var) end -- oxy alt set dec if ipcPARAM == 71 then Oxy = "L:OxyAltSetValve" Var = ipc.readLvar(Oxy) if Var > 0 then Var = Var - 1 ipc.sleep(1) end ipc.writeLvar(Oxy, Var) end -------------------------------------------------------------- Oxymask and valve -- Oxy mask and valve ON if ipcPARAM == 72 then ipc.writeLvar("L:SystemCondValueFSX", 1) ipc.writeLvar("L:SystemCondSelectFSX", 58) ipc.sleep(1000) if ipc.readLvar("L:OxyMaster") >= 0 then i = 0 while i < 100 do ipc.writeLvar("L:OxyMaster", i) ipc.sleep(1) i = i + 10 end end end -- Oxy mask and valve off if ipcPARAM == 73 then ipc.writeLvar("L:SystemCondValueFSX", 0) ipc.writeLvar("L:SystemCondSelectFSX", 58) ipc.sleep(1000) if ipc.readLvar("L:OxyMaster") <= 100 then i = 100 while i >= 0 do ipc.writeLvar("L:OxyMaster", i) ipc.sleep(1) i = i - 10 end end end -------------------------------------------------------------- Bottom tank state -- Bottom tank state for 5 seconds ON if ipcPARAM == 80 then LVarSet = "L:BottTankOn" ipc.writeLvar(LVarSet, 1) ipc.sleep(5000) ipc.writeLvar(LVarSet, 0) end -- Bottom tank state ON if ipcPARAM == 81 then LVarSet = "L:BottTankOn" ipc.writeLvar(LVarSet, 1) end -- Bottom tank state OFF if ipcPARAM == 82 then LVarSet = "L:BottTankOn" ipc.writeLvar(LVarSet, 0) end -------------------------------------------------------------- Top tank state -- Top tank state for 5 seconds ON if ipcPARAM == 83 then LVarSet = "L:TopTankOn" ipc.writeLvar(LVarSet, 1) ipc.sleep(5000) ipc.writeLvar(LVarSet, 0) end -- Top tank state ON if ipcPARAM == 84 then LVarSet = "L:TopTankOn" ipc.writeLvar(LVarSet, 1) end -- Top tank state OFF if ipcPARAM == 85 then LVarSet = "L:TopTankOn" ipc.writeLvar(LVarSet, 0) end -------------------------------------------------------------- Engine cut out -- Engine cut out ON if ipcPARAM == 90 then LVarSet = "L:SlowRunningCutoutSwitch" ipc.writeLvar(LVarSet, 1) end -- Engine cut out off if ipcPARAM == 91 then LVarSet = "L:SlowRunningCutoutSwitch" ipc.writeLvar(LVarSet, 0) end -- Engine cut out toggle if ipcPARAM == 92 then LVarSet = "L:SlowRunningCutoutSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -------------------------------------------------------------- Engine cartridge reload switch if ipcPARAM == 95 then acftname = ipc.readSTR(0x3D00, 35) if string.find(acftname,"Mk Ia",0,true) then LVarSet = "Eng1StartingMagneto" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) else LVarSet = "L:Eng1StarterCartridgeReloadSwitch" ipc.writeLvar(LVarSet, 1) end --ipc.display(acftname) --ipc.sleep(2000) end -------------------------------------------------------------- APU -- APU ON if ipcPARAM == 100 then LVarSet = "L:APUSwitch" ipc.writeLvar(LVarSet, 1) ipc.writeLvar("L:SystemCondValueFSX", 1) ipc.writeLvar("L:SystemCondSelectFSX", 53) end -- APU off if ipcPARAM == 101 then LVarSet = "L:APUSwitch" ipc.writeLvar(LVarSet, 0) ipc.writeLvar("L:SystemCondValueFSX", 0) ipc.writeLvar("L:SystemCondSelectFSX", 53) end -- APU toggle if ipcPARAM == 102 then LVarSet = "L:APUSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.writeLvar("L:SystemCondValueFSX", val) ipc.writeLvar("L:SystemCondSelectFSX", 53) end -------------------------------------------------------------- Cabin Vent -- vent inc if ipcPARAM == 105 then Def = "L:CabinVent" Var = ipc.readLvar(Def) if Var < 100 then Var = Var + 10 ipc.sleep(1) end ipc.writeLvar(Def, Var) end -- vent dec if ipcPARAM == 106 then Def = "L:CabinVent" Var = ipc.readLvar(Def) if Var > 0 then Var = Var - 10 ipc.sleep(1) end ipc.writeLvar(Def, Var) end -------------------------------------------------------------- Landing gear silencer -- LG silencer ON if ipcPARAM == 110 then LVarSet = "L:GearHornSilencerSwitch" ipc.writeLvar(LVarSet, 1) end
  2. Unfortunatelly the Concorde was the most difficult addon to get out LUA variables or controls. The devs ignored my begging over month so here is what I have found and it is not working correct for 100% (talking about the animations of some switches etc) The functions do what they should do. Here is the list of the parameters: -- FSLabs Concorde -- 10 AP1 -- 11 AP2 -- 12 ATHR1 -- 13 ATHR2 -- 14 FD1 -- 15 FD2 -- -- -- 20 INS -- 21 TRK HDG (sel) -- 22 HDG (hold) -- 23 TURB -- 24 Pitch hold -- 25 Mach hold (right side) -- 26 Max climb -- 27 IAS Hold (Right side) -- 28 ALT hold -- 29 Bach Beam -- 30 VOR/LOC -- 31 LAND -- 32 Glide -- 33 Max Cruise -- 34 vert Speed -- 35 ALT ACQ -- 36 Mach hold (left side) -- 37 IAS Hold (left side) -- 38 IAS ACQ -- -- 40 Alt inc -- 41 Alt dec -- -- 45 HDG left inc -- 46 HDG left dec -- 47 HDG right inc -- 48 HDG right dec -- -- 50 CRS left inc -- 51 CRS left dec -- 52 CRS right inc -- 53 CRS right dec -- -- 55 VS Pitch inc -- 56 VS Pitch dec -- 60 SPD inc -- 61 SPD dec -- -- 70 RAD/INS 1 (left) toggle -- 71 RAD/INS 2 (right) toggle -- -- 80 reheat eng1 inc -- 81 reheat eng1 dec -- 82 reheat eng2 inc -- 83 reheat eng2 dec -- 84 reheat eng3 inc -- 85 reheat eng3 dec -- 86 reheat eng4 inc -- 87 reheat eng4 dec -- -- 90 Landing lights on -- 91 Landing lights off -- -- 92 Taxi lights on -- 93 Taxi lights off -- -- 94 Taxi turn lights toggle -- -- 100 Instr. lights inc -- 101 Instr. lights dec -- ----------------------Panels -- 200 Brake, Cabin Pressure, Engine control -- 201 Air Intakes, sec eng controls -- 202 upper fuel, lower fuel, nozzle -- 203 air bleed, hydraulic -- 204 temperature control, engine stack -- 205 light controls (Capt, FO, engineer) -- 206 AC and DC -- 207 CDU1 +2 -- 208 overhead And here is the hole code: Have fun! -- FSLabs Concorde -- 10 AP1 -- 11 AP2 -- 12 ATHR1 -- 13 ATHR2 -- 14 FD1 -- 15 FD2 -- -- -- 20 INS -- 21 TRK HDG (sel) -- 22 HDG (hold) -- 23 TURB -- 24 Pitch hold -- 25 Mach hold (right side) -- 26 Max climb -- 27 IAS Hold (Right side) -- 28 ALT hold -- 29 Bach Beam -- 30 VOR/LOC -- 31 LAND -- 32 Glide -- 33 Max Cruise -- 34 vert Speed -- 35 ALT ACQ -- 36 Mach hold (left side) -- 37 IAS Hold (left side) -- 38 IAS ACQ -- -- 40 Alt inc -- 41 Alt dec -- -- 45 HDG left inc -- 46 HDG left dec -- 47 HDG right inc -- 48 HDG right dec -- -- 50 CRS left inc -- 51 CRS left dec -- 52 CRS right inc -- 53 CRS right dec -- -- 55 VS Pitch inc -- 56 VS Pitch dec -- 60 SPD inc -- 61 SPD dec -- -- 70 RAD/INS 1 (left) toggle -- 71 RAD/INS 2 (right) toggle -- -- 80 reheat eng1 inc -- 81 reheat eng1 dec -- 82 reheat eng2 inc -- 83 reheat eng2 dec -- 84 reheat eng3 inc -- 85 reheat eng3 dec -- 86 reheat eng4 inc -- 87 reheat eng4 dec -- -- 90 Landing lights on -- 91 Landing lights off -- -- 92 Taxi lights on -- 93 Taxi lights off -- -- 94 Taxi turn lights toggle -- -- 100 Instr. lights inc -- 101 Instr. lights dec -- ----------------------Panels -- 200 Brake, Cabin Pressure, Engine control -- 201 Air Intakes, sec eng controls -- 202 upper fuel, lower fuel, nozzle -- 203 air bleed, hydraulic -- 204 temperature control, engine stack -- 205 light controls (Capt, FO, engineer) -- 206 AC and DC -- 207 CDU1 +2 -- 208 overhead ------------------------------------------------------------AUTOPILOT ------------------------------------------------------------ -- AP 1 if ipcPARAM == 10 then ipc.control(66587,71084) -- AP 2 elseif ipcPARAM == 11 then ipc.control(66587,71085) ------------------------------------------------------------ATHR -- ATHR 1 elseif ipcPARAM == 12 then ipc.control(66587,71080) -- ATHR 2 elseif ipcPARAM == 13 then ipc.control(66587,71081) ------------------------------------------------------------FD -- FD1 elseif ipcPARAM == 14 then ipc.control(66587,71082) -- FD2 elseif ipcPARAM == 15 then ipc.control(66587,71083) ----------------------------------------------------------------Ap functions -- INS elseif ipcPARAM == 20 then ipc.control(66587,71063) -- TRK HDG (sel) elseif ipcPARAM == 21 then ipc.control(66587,71065) -- HDG (hold) elseif ipcPARAM == 22 then ipc.control(66587,71067) -- TURB elseif ipcPARAM == 23 then ipc.control(66587,71068) -- Pitch hold elseif ipcPARAM == 24 then ipc.control(66587,71070) -- Mach hold (right side) elseif ipcPARAM == 25 then ipc.control(66587,71072) -- Max climb elseif ipcPARAM == 26 then ipc.control(66587,71074) -- IAS hold (right side) elseif ipcPARAM == 27 then ipc.control(66587,71076) -- Alt hold elseif ipcPARAM == 28 then ipc.control(66587,71078) -- Back Beam elseif ipcPARAM == 29 then ipc.control(66587,71064) -- VOR/LOC elseif ipcPARAM == 30 then ipc.control(66587,71066) -- LAND elseif ipcPARAM == 31 then ipc.control(66587,71071) -- Glide elseif ipcPARAM == 32 then ipc.control(66587,71073) -- Max cruise elseif ipcPARAM == 33 then ipc.control(66587,71075) -- Vert Speed elseif ipcPARAM == 34 then ipc.control(66587,71077) -- ALT ACQ elseif ipcPARAM == 35 then ipc.control(66587,71079) -- MACH hold (left side) elseif ipcPARAM == 36 then ipc.control(66587,71060) -- IAS hold (left side) elseif ipcPARAM == 37 then ipc.control(66587,71061) -- IAS ACQ elseif ipcPARAM == 38 then ipc.control(66587,71062) ----------------------------------------------------------------AP dials -- Alt inc elseif ipcPARAM == 40 then ipc.control(66587,71136) -- Alt dec elseif ipcPARAM == 41 then ipc.control(66587,71135) -- HDG left inc elseif ipcPARAM == 45 then ipc.control(66587,71107) -- HDG left dec elseif ipcPARAM == 46 then ipc.control(66587,71108) -- HDG right inc elseif ipcPARAM == 47 then ipc.control(66587,71129) -- HDG right dec elseif ipcPARAM == 48 then ipc.control(66587,71128) -- CRS left inc elseif ipcPARAM == 50 then ipc.control(66587,71110) -- CRS left dec elseif ipcPARAM == 51 then ipc.control(66587,71109) -- CRS right inc elseif ipcPARAM == 52 then ipc.control(66587,71121) -- CRS right dec elseif ipcPARAM == 53 then ipc.control(66587,71122) -- VS (Pitch) dec elseif ipcPARAM == 57 then ipc.control(66587,73530) -- VS (Pitch) inc elseif ipcPARAM == 55 then ipc.control(66587,73531) -- SPD inc elseif ipcPARAM == 60 then ipc.control(66587,71095) -- SPD dec elseif ipcPARAM == 61 then ipc.control(66587,71096) -- RAD / INS 1 (left) toggle elseif ipcPARAM == 70 then ipc.control(66587,71050) -- RAD / INS 2 (right) toggle elseif ipcPARAM == 71 then ipc.control(66587,71051) ----------------------------------------------------Reheat -- Reheat Eng 1 inc elseif ipcPARAM == 80 then ipc.control(66587,73600) -- Reheat Eng 1 dec elseif ipcPARAM == 81 then ipc.control(66587,73601) -- Reheat Eng 2 inc elseif ipcPARAM == 82 then ipc.control(66587,73605) -- Reheat Eng 2 dec elseif ipcPARAM == 83 then ipc.control(66587,73606) -- Reheat Eng 3 inc elseif ipcPARAM == 84 then ipc.control(66587,73610) -- Reheat Eng 3 dec elseif ipcPARAM == 85 then ipc.control(66587,73611) -- Reheat Eng 4 dec elseif ipcPARAM == 86 then ipc.control(66587,73615) -- Reheat Eng 4 dec elseif ipcPARAM == 87 then ipc.control(66587,73616) ----------------------------------------------------Lights -- Landing lights on elseif ipcPARAM == 90 then ipc.control(66587,75505) ipc.sleep(150) ipc.control(66587,75506) -- Landing lights off elseif ipcPARAM == 91 then ipc.control(66587,75507) ipc.sleep(150) ipc.control(66587,75508) -- Taxi lights on elseif ipcPARAM == 92 then ipc.control(66587,75510) ipc.sleep(150) ipc.control(66587,75511) -- Taxi lights off elseif ipcPARAM == 93 then ipc.control(66587,75512) ipc.sleep(150) ipc.control(66587,75513) -- Taxi turn lights toggle elseif ipcPARAM == 94 then ipc.control(66587,75500) ipc.sleep(100) ipc.control(66587,75499) -- instr lights inc elseif ipcPARAM == 100 then ipc.control(66587,77401) ipc.sleep(10) ipc.control(66587,77411) -- instr lights dec elseif ipcPARAM == 101 then ipc.control(66587,77400) ipc.sleep(10) ipc.control(66587,77410) -- flood light inc elseif ipcPARAM == 102 then ipc.control(66587,75137) -- flood light dec elseif ipcPARAM == 103 then ipc.control(66587,75139) -- flood light full elseif ipcPARAM == 104 then ipc.control(66587,75137) ipc.sleep(10) ipc.control(66587,75137) -- flood light off elseif ipcPARAM == 105 then ipc.control(66587,75139) ipc.sleep(10) ipc.control(66587,75139) -- all console lights on elseif ipcPARAM == 106 then i = 0 while i <= 6 do ipc.control(66587,75141) -- Glareshield ipc.sleep(10) ipc.control(66587,75145) -- centre console ipc.sleep(10) ipc.control(66587,75149) -- centre dash ipc.sleep(10) ipc.control(66587,75153) -- centre console flood ipc.sleep(10) ipc.control(66587,75157) -- roof i = i + 1 end -- all console lights off elseif ipcPARAM == 107 then i = 0 while i <= 6 do ipc.control(66587,75140) -- Glareshield ipc.sleep(10) ipc.control(66587,75144) -- centre console ipc.sleep(10) ipc.control(66587,75148) -- centre dash ipc.sleep(10) ipc.control(66587,75152) -- centre console flood ipc.sleep(10) ipc.control(66587,75156) -- roof i = i + 1 end -- Anti Coll lights toggle elseif ipcPARAM == 110 then ipc.control(66587,75010) -- Nav lights toggle elseif ipcPARAM == 111 then ipc.control(66587,75012) -------------------------------------------------- -- No smoking toggle elseif ipcPARAM == 120 then ipc.control(66587,75047) -- seatbelt toggle elseif ipcPARAM == 121 then ipc.control(66587,75048) -------------------------------------------------- Eng HP Valves -- ENG1 HP Valve ON elseif ipcPARAM == 130 then ipc.control(66587,75082) -- ENG1 HP Valve OFF elseif ipcPARAM == 131 then ipc.control(66587,75083) -- ENG2 HP Valve ON elseif ipcPARAM == 132 then ipc.control(66587,75084) -- ENG2 HP Valve OFF elseif ipcPARAM == 133 then ipc.control(66587,75085) -- ENG3 HP Valve ON elseif ipcPARAM == 134 then ipc.control(66587,75086) -- ENG3 HP Valve OFF elseif ipcPARAM == 135 then ipc.control(66587,75087) -- ENG4 HP Valve ON elseif ipcPARAM == 136 then ipc.control(66587,75088) -- ENG4 HP Valve OFF elseif ipcPARAM == 137 then ipc.control(66587,75089) -------------------------------------------------- little white AP switches on -- little white AP switches on elseif ipcPARAM == 140 then ipc.control(66587,75408) ipc.sleep(125) ipc.control(66587,75410) ipc.sleep(125) ipc.control(66587,75412) ipc.sleep(125) ipc.control(66587,75414) ipc.sleep(125) ipc.control(66587,75416) ipc.sleep(125) ipc.control(66587,75418) ipc.sleep(125) ipc.control(66587,75420) ipc.sleep(125) ipc.control(66587,75422) ipc.sleep(125) ipc.control(66587,75424) ipc.sleep(125) ipc.control(66587,75426) ipc.sleep(125) ipc.control(66587,75428) ipc.sleep(125) ipc.control(66587,75430) ipc.sleep(125) ipc.control(66587,75432) ipc.sleep(125) ipc.control(66587,75434) ipc.sleep(125) -----------------------------------------------------------------Panels -- Brake, Cabin Pressure, Engine control elseif ipcPARAM == 200 then ipc.control(66506,8020) --brake control ipc.control(66506,8021) --cabin pressure ipc.control(66506,8014) --engine control -- Air Intakes, sec eng controls elseif ipcPARAM == 201 then ipc.control(66506,8015) --sec engine cpntrol ipc.control(66506,8016) --air intake -- upper fuel, lower fuel, nozzle elseif ipcPARAM == 202 then ipc.control(66506,8009) --fuel bottom ipc.control(66506,8010) --fuel top ipc.control(66506,8019) --engine control -- air bleed, hydraulic elseif ipcPARAM == 203 then ipc.control(66506,8012) --air bleed ipc.control(66506,8011) --hydr -- temperature control, engine stack elseif ipcPARAM == 204 then ipc.control(66506,8030) --popup engine stack ipc.control(66506,8013) --temp control -- lights elseif ipcPARAM == 205 then ipc.control(66506,8025) --eng lights ipc.control(66506,8027) --FO lights ipc.control(66506,8026) --Capt lights -- AC/DC elseif ipcPARAM == 206 then ipc.control(66506,8007) --DC ipc.control(66506,8008) --AC -- CDU1, CDU2 elseif ipcPARAM == 207 then ipc.control(66506,8035) --CDU1 ipc.sleep(50) ipc.control(66506,8036) --CDU2 -- Overhead elseif ipcPARAM == 208 then ipc.control(66506,8002) ipc.control(66506,8003) end
  3. Hello, I have written a little tutorial how to "install" LUA files and scripts. I have tried to write it in a hopefully uncomplicated way with many pictures, so that everybody could set it properly up... Enjoy! Lua Installation.pdf
  4. Hello, first, sorry that I have to start a new topic, but I can't edit my other LUA Script post... I have reworked my LUA Script for the PMDG J41. There are some new features: - some new functions implemented, e.g. ice switches (except eng ice), all lights (including ice obs and consp lights) - all switches have their sounds now - all switches are animated (e.g. ALT) - all functions are in this LUA now - you don't need an additional Macro file! and the best feature: MCP Combo Users (using the FSUIPC VRInsight Mod) have now a synchosized Autopilot Display, means the values of the J41 Display are now also visible on the MCP Display! All credits go to kosta!!! (sometimes HDG or ALT is 1 degree or 100ft wrong, but all in all it works very good! Maybe ist working for other VRInsight devices too, but I don't know - try it!) Because of this complete new stuff, the disadvantage is, that you have to reassign your buttons. Old LUA assignments will not work, I'm sorry! Important! I will not explain how to use this LUA Script, or how to use the "FSUIPC VRInsight Mod". Everything you should need and know is in this forum here or better in the FSUIPC manuals! Please read and you will understand!!! Have fun!!! Günter Here is the list of all functions -- 9 ALT sel -- 10 ALT plus -- 11 ALT plus fast -- 12 ALT minus -- 13 ALT minus fast -- 14 ALT hold -- -- 15 HDG inc -- 16 HDG inc fast -- 17 HDG dec -- 18 HDG dec fast -- 19 HDG -- 20 HDG bug press -- -- 25 VS inc -- 26 VS dec -- -- 30 CRS left press -- -- 35 IAS Press -- 36 IAS plus -- 37 IAS plus fast -- 38 IAS minus -- 39 IAS minus fast -- -- 50 NAV -- 51 APR -- 52 VS -- 53 BC -- 54 IAS -- 55 STBY -- -- 56 AP Trim Power Switch on -- 57 AP Trim Power Switch off -- 58 AP Master -- 59 AP Master off -- -- 70 LEFT Bearing CIRCLE Knob Minus -- 71 LEFT Bearing CIRCLE Knob plus -- 72 LEFT Bearing DIAMOND Knob Minus -- 73 LEFT Bearing DIAMOND Knob plus -- -- 75 EFIS FULL/Map -- 76 EFIS TCAS -- 77 EFIS GSPD/TTG -- 78 EFIS ET -- 79 EFIS V/L -- 80 EFIS LNAV -- -- 90 Pilot analog ADFVOR 1 Toggle -- 91 Pilot analog ADFVOR 2 Toggle -- 92 Pilot ADF1 -- 93 Pilot VOR1 -- 94 Pilot ADF2 -- 95 Pilot VOR2 -- -- 100 Panel flood light on -- 101 Panel flood light off -- 102 Panel flood light toggle -- -- 103 Console lights ON -- 104 Console lights Off -- 105 Console lights toggle -- -- 106 flightdeck flood light toggle -- 107 BCN light toggle -- -- 108 NAV Lights ON -- 109 NAV Lights Off -- 110 NAV Lights toggle -- -- 111 STR light toggle -- 112 Landing lights toggle -- 113 Taxi light toggle -- -- 114 Consp Lights ON -- 115 Consp Lights Off -- 116 Consp Lights toggle -- -- 120 LEFT Battery switch TOGGLE -- 121 RIGHT Battery switch TOGGLE -- 122 BOTH Battery switch ON -- 123 BOTH Battery switch OFF -- -- 125 Left AVIONICS SWITCh TOGGLE -- 126 Right AVIONICS SWITCh TOGGLE -- 127 both AVIONICS SWITCh on -- 128 both AVIONICS SWITCh off -- -- 130 LEFT Generator SWITCH TOGGLE -- 131 RIGHT Generator SWITCH TOGGLE -- 132 LEFT Generator SWITCH on -- 133 LEFT Generator SWITCH off -- 134 RIGHT Generator SWITCH on -- 135 RIGHT Generator SWITCH off -- -- 136 Left fuel Pump on -- 137 Left fuel Pump off -- 138 Right fuel Pump on -- 139 Right fuel Pump off -- -- 140 Prop Sync Toggle -- -- 145 Ground Spoiler switch on -- 146 Ground Spoiler switch off -- 147 Ground Spoiler switch toggle -- -- 150 windshield deice on -- 151 windshield deice off -- 152 airdata deice on -- 153 airdata deice off -- 155 Prop deice short on -- 156 Prop deice short off -- 157 Prop deice long on -- 158 CCT Auto Cycle Switch -- -- 160 warning mute switch toggle -- -- 165 TOCW test switch on -- 166 TOCW test switch off -- -- 170 Seatbelt on -- 171 Seatbelt on -- -- 172 no smoking on -- 173 no smoking on -- -- 176 engine 1 feather (LEFT) -- 177 no engine feather -- 178 engine 2 feather (RIGHT) -- -- 180 select engine 1 (LEFT) -- 181 select engine 2 (RIGHT) -- 182 unselect engines -- -- 185 Feathering and starting selected engine -- 186 abort starting sequence (stop) for selected engine -- 187 starting selected engine -- -- 190 gust locks toggle -- 195 APU (ground power) connection toggle -- 198 yellow attention get switch -- 200 Anti-Skid on -- 201 Anti Skid off -- 202 Anti Skid toggle And here is the code (sorry, I can't attach a file here) -- LUA Script for the PMDG J41 -- January, the 4th 2011 -- made by Guenter (Guenseli) Steiner -- file is free for use; credits are always welcome -- thanks to kosta and some other guys... of course Pete Dowson -- 9 ALT sel -- 10 ALT plus -- 11 ALT plus fast -- 12 ALT minus -- 13 ALT minus fast -- 14 ALT hold -- -- 15 HDG inc -- 16 HDG inc fast -- 17 HDG dec -- 18 HDG dec fast -- 19 HDG -- 20 HDG bug press -- -- 25 VS inc -- 26 VS dec -- -- 30 CRS left press -- -- 35 IAS Press -- 36 IAS plus -- 37 IAS plus fast -- 38 IAS minus -- 39 IAS minus fast -- -- 50 NAV -- 51 APR -- 52 VS -- 53 BC -- 54 IAS -- 55 STBY -- -- 56 AP Trim Power Switch on -- 57 AP Trim Power Switch off -- 58 AP Master -- 59 AP Master off -- -- 70 LEFT Bearing CIRCLE Knob Minus -- 71 LEFT Bearing CIRCLE Knob plus -- 72 LEFT Bearing DIAMOND Knob Minus -- 73 LEFT Bearing DIAMOND Knob plus -- -- 75 EFIS FULL/Map -- 76 EFIS TCAS -- 77 EFIS GSPD/TTG -- 78 EFIS ET -- 79 EFIS V/L -- 80 EFIS LNAV -- -- 90 Pilot analog ADFVOR 1 Toggle -- 91 Pilot analog ADFVOR 2 Toggle -- 92 Pilot ADF1 -- 93 Pilot VOR1 -- 94 Pilot ADF2 -- 95 Pilot VOR2 -- -- 100 Panel flood light on -- 101 Panel flood light off -- 102 Panel flood light toggle -- -- 103 Console lights ON -- 104 Console lights Off -- 105 Console lights toggle -- -- 106 flightdeck flood light toggle -- 107 BCN light toggle -- -- 108 NAV Lights ON -- 109 NAV Lights Off -- 110 NAV Lights toggle -- -- 111 STR light toggle -- 112 Landing lights toggle -- 113 Taxi light toggle -- -- 114 Consp Lights ON -- 115 Consp Lights Off -- 116 Consp Lights toggle -- -- 120 LEFT Battery switch TOGGLE -- 121 RIGHT Battery switch TOGGLE -- 122 BOTH Battery switch ON -- 123 BOTH Battery switch OFF -- -- 125 Left AVIONICS SWITCh TOGGLE -- 126 Right AVIONICS SWITCh TOGGLE -- 127 both AVIONICS SWITCh on -- 128 both AVIONICS SWITCh off -- -- 130 LEFT Generator SWITCH TOGGLE -- 131 RIGHT Generator SWITCH TOGGLE -- 132 LEFT Generator SWITCH on -- 133 LEFT Generator SWITCH off -- 134 RIGHT Generator SWITCH on -- 135 RIGHT Generator SWITCH off -- -- 136 Left fuel Pump on -- 137 Left fuel Pump off -- 138 Right fuel Pump on -- 139 Right fuel Pump off -- -- 140 Prop Sync Toggle -- -- 145 Ground Spoiler switch on -- 146 Ground Spoiler switch off -- 147 Ground Spoiler switch toggle -- -- 150 windshield deice on -- 151 windshield deice off -- 152 airdata deice on -- 153 airdata deice off -- 155 Prop deice short on -- 156 Prop deice short off -- 157 Prop deice long on -- 158 CCT Auto Cycle Switch -- -- 160 warning mute switch toggle -- -- 165 TOCW test switch on -- 166 TOCW test switch off -- -- 170 Seatbelt on -- 171 Seatbelt on -- -- 172 no smoking on -- 173 no smoking on -- -- 176 engine 1 feather (LEFT) -- 177 no engine feather -- 178 engine 2 feather (RIGHT) -- -- 180 select engine 1 (LEFT) -- 181 select engine 2 (RIGHT) -- 182 unselect engines -- -- 185 Feathering and starting selected engine -- 186 abort starting sequence (stop) for selected engine -- 187 starting selected engine -- -- 190 gust locks toggle -- 195 APU (ground power) connection toggle -- 198 yellow attention get switch -- 200 Anti-Skid on -- 201 Anti Skid off -- 202 Anti Skid toggle ------------------------------------------------------------------------------- -- you should delete this part BELOW the lines if you don't use a VRInsight device ------------------------------------------------------------------------------- if VRImodel == nil then VRIdevice = "COM3" VRIdriver = "COM2" end speed = 115200 handshake = 0 minsize = 8 maxsize = 8 dev = com.open(VRIdevice, speed, handshake) if dev == 0 then ipc.log("Could not open VRIdevice port") ipc.display("Could not open VRIdevice port") ipc.sleep(1000) end ------------------------------------------------------------------------------- -- you should delete this part ABOVE the lines if you don't use a VRInsight device ------------------------------------------------------------------------------- --ipc.display("test start") --ipc.sleep(100) --ipc.display("VRIdevice COM".. VRIdevice.. "\nVRIdriver COM".. VRIdriver.. "\nipcPARAM".. ipcPARAM) --ipc.sleep(1000) ------------------------------------------------------------AP ALT -- ALT sel if ipcPARAM == 9 then ipc.writeLvar("L:FdModeselAltselSwitch", 1) ipc.control(66587,282) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselAltselSwitch", 0) ipc.control(66587,8031) -- ALT plus elseif ipcPARAM == 10 then Var = ipc.readLvar("IrcAltSelKnob") if Var >= 100 then Var = 1 end ipc.writeLvar("IrcAltSelKnob", Var+1) ipc.control(66587,3921) ipc.control(66587,8031) -- ALT plus fast elseif ipcPARAM == 11 then Var = ipc.readLvar("IrcAltSelKnob") if Var >= 100 then Var = 1 end ipc.writeLvar("IrcAltSelKnob", Var+5) for n=1, 10, 1 do ipc.control(66587,3921) end ipc.control(66587,8031) -- ALT minus elseif ipcPARAM == 12 then Var = ipc.readLvar("IrcAltSelKnob") if Var <= 1 then Var = 100 end ipc.writeLvar("IrcAltSelKnob", Var-1) ipc.control(66587,3920) ipc.control(66587,8031) -- ALT minus fast elseif ipcPARAM == 13 then Var = ipc.readLvar("IrcAltSelKnob") if Var <= 1 then Var = 100 end ipc.writeLvar("IrcAltSelKnob", Var-5) for n=1, 10, 1 do ipc.control(66587,3920) end ipc.control(66587,8031) -- ALT hold elseif ipcPARAM == 14 then ipc.writeLvar("L:FdModeselAltSwitch", 1) ipc.control(66587,281) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselAltSwitch", 0) ipc.control(66587,8031) ------------------------------------------------------------AP HDG -- HDG plus elseif ipcPARAM == 15 then ipc.control(66587,26902) ipc.control(66587,8031) -- HDG plus fast elseif ipcPARAM == 16 then for n=1, 10, 1 do ipc.control(66587,26902) end ipc.control(66587,8031) -- HDG minus elseif ipcPARAM == 17 then ipc.control(66587,26901) ipc.control(66587,8031) -- HDG minus fast elseif ipcPARAM == 18 then for n=1, 10, 1 do ipc.control(66587,26901) end ipc.control(66587,8031) -- HDG elseif ipcPARAM == 19 then ipc.writeLvar("L:FdModeselHdgSwitch", 1) ipc.control(66587,277) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselHdgSwitch", 0) ipc.control(66587,8031) -- HDG bug press elseif ipcPARAM == 20 then ipc.writeLvar("L:IrcHdgKnobPush", 1) ipc.control(66587,2691) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:IrcHdgKnobPush", 0) ipc.control(66587,8031) ------------------------------------------------------------ -- VS inc elseif ipcPARAM == 25 then buffer = ipc.readLvar("L:VSIASTarget") Var = ipc.readLvar("L:AP_PitchWheel") ipc.writeLvar("AP_PitchWheel", Var+10) ipc.writeLvar("L:VSIASTarget", buffer+100) ipc.control(65894) ipc.control(66587,8031) buffer = ipc.readLvar("L:VSIASTarget") com.write(dev, string.format("DSP_%04d", buffer), 8) -- VS dec elseif ipcPARAM == 26 then buffer = ipc.readLvar("L:VSIASTarget") Var = ipc.readLvar("L:AP_PitchWheel") ipc.writeLvar("AP_PitchWheel", Var-10) ipc.writeLvar("L:VSIASTarget", buffer-100) ipc.control(65895) ipc.control(66587,8031) buffer = ipc.readLvar("L:VSIASTarget") com.write(dev, string.format("DSP_%04d", buffer), 8) -- CRS press elseif ipcPARAM == 30 then ipc.writeLvar("L:LeftIrcCrsKnobPush", 1) ipc.control(66587,2671) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:LeftIrcCrsKnobPush", 0) ipc.control(66587,8031) -- IAS knob press elseif ipcPARAM == 35 then ipc.writeLvar("L:IrcIasKnobPush", 1) ipc.control(66587,2681) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:IrcIasKnobPush", 0) ipc.control(66587,8031) -- IAS plus elseif ipcPARAM == 36 then ipc.control(66587,26802) ipc.control(66587,8031) -- IAS plus fast elseif ipcPARAM == 37 then for n=1, 10, 1 do ipc.control(66587,26802) end ipc.control(66587,8031) -- IAS minus elseif ipcPARAM == 38 then ipc.control(66587,26801) ipc.control(66587,8031) -- IAS minus fast elseif ipcPARAM == 39 then for n=1, 10, 1 do ipc.control(66587,26801) end ipc.control(66587,8031) ------------------------------------------------------------ AP Mode select -- NAV elseif ipcPARAM == 50 then ipc.writeLvar("L:FdModeselNavSwitch", 1) ipc.control(66587,278) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselNavSwitch", 0) ipc.control(66587,8031) -- APR elseif ipcPARAM == 51 then ipc.writeLvar("L:FdModeselAprSwitch", 1) ipc.control(66587,279) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselAprSwitch", 0) ipc.control(66587,8031) -- VS elseif ipcPARAM == 52 then ipc.writeLvar("L:FdModeselVsSwitch", 1) ipc.control(66587,283) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselVsSwitch", 0) ipc.control(66587,8031) -- BC elseif ipcPARAM == 53 then ipc.writeLvar("L:FdModeselBcSwitch", 1) ipc.control(66587,280) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselBcSwitch", 0) ipc.control(66587,8031) -- IAS elseif ipcPARAM == 54 then ipc.writeLvar("L:FdModeselIasSwitch", 1) ipc.control(66587,284) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselIasSwitch", 0) ipc.control(66587,8031) -- STBY elseif ipcPARAM == 55 then ipc.writeLvar("L:FdModeselSbySwitch", 1) ipc.control(66587,2851) ipc.control(66587,8031) ipc.sleep(200) ipc.writeLvar("L:FdModeselSbySwitch", 0) ipc.control(66587,2850) ipc.control(66587,8031) -- AP Trim Power Switch on elseif ipcPARAM == 56 then ipc.writeLvar("L:ApTrimPowerSwitch", 1) ipc.control(66587,8034) -- AP Trim Power Switch off elseif ipcPARAM == 57 then ipc.writeLvar("L:ApTrimPowerSwitch", 0) ipc.control(66587,8034) -- AP Master elseif ipcPARAM == 58 then ipc.writeLvar("L:APEngageSwitchSelect", 1) ipc.control(65580) ipc.control(66587,8038) ipc.sleep(200) ipc.writeLvar("L:APEngageSwitchSelect", 0) ipc.control(66587,8038) -- AP Master off elseif ipcPARAM == 59 then ipc.writeLvar("L:APEngageSwitchSelect", 1) ipc.control(65791) ipc.control(66587,8038) ipc.sleep(200) ipc.writeLvar("L:APEngageSwitchSelect", 0) ipc.control(66587,8038) ------------------------------------------------------------ EFIS BRG1 and BRG2 -- LEFT Bearing CIRCLE Knob Minus elseif ipcPARAM == 70 then i = ipc.readLvar("L:LeftBearingCircleKnob") if i < 3 then ipc.writeLvar("L:LeftBearingCircleKnob", i+1) ipc.sleep(10) ipc.control(66587, 8031) end if i == 3 then ipc.writeLvar("L:LeftBearingCircleKnob", 3) end -- LEFT Bearing CIRLCE Knob Plus elseif ipcPARAM == 71 then i = ipc.readLvar("L:LeftBearingCircleKnob") if i > 0 then ipc.writeLvar("L:LeftBearingCircleKnob", i-1) ipc.sleep(10) ipc.control(66587, 8031) end if i == 0 then ipc.writeLvar("L:LeftBearingCircleKnob", 0) end -- LEFT Bearing DIAMOND Knob Minus elseif ipcPARAM == 72 then i = ipc.readLvar("L:LeftBearingDiamondKnob") if i > 0 then ipc.writeLvar("L:LeftBearingDiamondKnob", i-1) ipc.sleep(10) ipc.control(66587, 8031) end if i == 0 then ipc.writeLvar("L:LeftBearingDiamondKnob", 0) end -- LEFT Bearing DIAMOND Knob Plus elseif ipcPARAM == 73 then i = ipc.readLvar("L:LeftBearingDiamondKnob") if i < 3 then ipc.writeLvar("L:LeftBearingDiamondKnob", i+1) ipc.sleep(10) ipc.control(66587, 8031) end if i == 3 then ipc.writeLvar("L:LeftBearingDiamondKnob", 3) end ------------------------------------------------------------ EFIS -- Full/Map elseif ipcPARAM == 75 then ipc.control(66587,214) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) -- TCAS elseif ipcPARAM == 76 then ipc.control(66587,215) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) -- GSPD/TTG elseif ipcPARAM == 77 then ipc.control(66587,217) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) -- ET elseif ipcPARAM == 78 then ipc.control(66587,218) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) -- V/L elseif ipcPARAM == 79 then ipc.control(66587,21901) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) -- LNAV elseif ipcPARAM == 80 then ipc.control(66587,21910) ipc.control(66587,8031) ipc.sleep(200) ipc.control(66587,8031) ------------------------------------------------------------ Pilot analog VOR/ADF -- Pilot analog ADFVOR 1 Toggle elseif ipcPARAM == 90 then LVarSet = "L:LeftAdfVorSwitch" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8024) -- Pilot analog ADFVOR 2 Toggle elseif ipcPARAM == 91 then LVarSet = "L:LeftVorAdfSwitch" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8024) -- Pilot ADF1 elseif ipcPARAM == 92 then ipc.writeLvar("L:LeftAdfVorSwitch", 0) ipc.control(66587, 8024) -- Pilot VOR1 elseif ipcPARAM == 93 then ipc.writeLvar("L:LeftAdfVorSwitch", 1) ipc.control(66587, 8024) -- Pilot ADF2 elseif ipcPARAM == 94 then ipc.writeLvar("L:LeftVorAdfSwitch", 1) ipc.control(66587, 8024) -- Pilot VOR2 elseif ipcPARAM == 95 then ipc.writeLvar("L:LeftVorAdfSwitch", 0) ipc.control(66587, 8024) ------------------------------------------------------------ Lights -- Panel flood light on elseif ipcPARAM == 100 then ipc.writeLvar("L:PanelFloodSW", 1) ipc.control(66587, 8029) -- Panel flood light off elseif ipcPARAM == 101 then ipc.writeLvar("L:PanelFloodSW", 0) ipc.control(66587, 8029) -- Panel flood light toggle elseif ipcPARAM == 102 then LVarSet = "L:PanelFloodSW" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8029) ---------------------------------------------- -- Console lights ON elseif ipcPARAM == 103 then ipc.control(66056) ipc.writeLvar("L:InstrConsolesLightSwitch", 1) ipc.writeLvar("L:InstrRoofLightSwitch", 1) ipc.writeLvar("L:InstrGlareshieldLightSwitch", 1) ipc.control(66587, 8031) -- Console lights OFF elseif ipcPARAM == 104 then ipc.control(66057) ipc.writeLvar("L:InstrConsolesLightSwitch", 0) ipc.writeLvar("L:InstrRoofLightSwitch", 0) ipc.writeLvar("L:InstrGlareshieldLightSwitch", 0) ipc.control(66587, 8031) -- Console lights toggle elseif ipcPARAM == 105 then val = 0 val2 = 66057 if ipc.readLvar("L:InstrConsolesLightSwitch") == 0 then val = 1 val2 = 66056 end ipc.control(val2) ipc.writeLvar("L:InstrConsolesLightSwitch", val) ipc.writeLvar("L:InstrRoofLightSwitch", val) ipc.writeLvar("L:InstrGlareshieldLightSwitch", val) ipc.control(66587, 8031) -- flightdeck flood light toggle elseif ipcPARAM == 106 then ipc.control(66376) ipc.control(66587,8027) -- BCN light toggle elseif ipcPARAM == 107 then ipc.control(66239) ipc.control(66587,8027) -- NAV Lights ON elseif ipcPARAM == 108 then ipc.writeLvar("L:NavLightSwitch", 2) ipc.control(66587, 8028) -- NAV Lights Off elseif ipcPARAM == 109 then ipc.writeLvar("L:NavLightSwitch", 1) ipc.control(66587, 8027) -- NAV light toggle elseif ipcPARAM == 110 then LVarSet = "L:NavLightSwitch" val = 1 val2 = 8027 if ipc.readLvar(LVarSet) == 1 then val = 2 val2 = 8028 end ipc.writeLvar(LVarSet, val) ipc.control(66587, val2) -- STR light toggle elseif ipcPARAM == 111 then ipc.control(65560) ipc.control(66587,8028) -- Landing lights toggle elseif ipcPARAM == 112 then ipc.control(65751) ipc.control(66587,8027) -- Taxi light toggle elseif ipcPARAM == 113 then ipc.control(66240) ipc.control(66587,8028) -- Consp Lights ON elseif ipcPARAM == 114 then ipc.writeLvar("L:ConspicLight", 1) ipc.control(66587, 8028) ipc.control(66377) -- Consp Lights Off elseif ipcPARAM == 115 then ipc.writeLvar("L:ConspicLight", 0) ipc.control(66587, 8027) ipc.control(66377) -- Consp light toggle elseif ipcPARAM == 116 then LVarSet = "L:ConspicLight" val = 0 val2 = 8027 if ipc.readLvar(LVarSet) == 0 then val = 1 val2 = 8028 end ipc.writeLvar(LVarSet, val) ipc.control(66587, val2) ipc.control(66377) ------------------------------------------------------------ Battery -- LEFT Battery switch TOGGLE elseif ipcPARAM == 120 then LVarSet = "L:LeftBatSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8028) -- RIGHT Battery switch TOGGLE elseif ipcPARAM == 121 then LVarSet = "L:RightBatSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8028) -- BOTH Battery switch on elseif ipcPARAM == 122 then ipc.writeLvar("L:RightBatSwitch", 1) ipc.control(66587, 8028) ipc.sleep(250) ipc.writeLvar("L:LeftBatSwitch", 1) ipc.control(66587, 8028) -- BOTH Battery switch off elseif ipcPARAM == 123 then ipc.writeLvar("L:RightBatSwitch", 0) ipc.control(66587, 8027) ipc.sleep(250) ipc.writeLvar("L:LeftBatSwitch", 0) ipc.control(66587, 8027) ------------------------------------------------------------ Avionics -- Left AVIONICS SWITCh TOGGLE elseif ipcPARAM == 125 then LVarSet = "L:LeftAvionicsMaster" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar("L:LeftAvionicsMasterGuard", val) ipc.control(66587, 8026) ipc.sleep(500) ipc.writeLvar(LVarSet, val) ipc.control(66587, 8027) -- RIGHT AVIONICS SWITCh TOGGLE elseif ipcPARAM == 126 then LVarSet = "L:RightAvionicsMaster" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar("L:RightAvionicsMasterGuard", val) ipc.control(66587, 8026) ipc.sleep(500) ipc.writeLvar(LVarSet, val) ipc.control(66587, 8027) -- both AVIONICS SWITCh on elseif ipcPARAM == 127 then ipc.writeLvar("L:RightAvionicsMasterGuard", 1) ipc.control(66587, 8026) ipc.sleep(400) ipc.writeLvar("L:RightAvionicsMaster", 1) ipc.control(66587, 8028) ipc.sleep(100) ipc.writeLvar("L:LeftAvionicsMasterGuard", 1) ipc.control(66587, 8026) ipc.sleep(400) ipc.writeLvar("L:LeftAvionicsMaster", 1) ipc.control(66587, 8028) -- both AVIONICS SWITCh off elseif ipcPARAM == 128 then ipc.writeLvar("L:RightAvionicsMasterGuard", 0) ipc.control(66587, 8026) ipc.sleep(400) ipc.writeLvar("L:RightAvionicsMaster", 0) ipc.control(66587, 8027) ipc.sleep(100) ipc.writeLvar("L:LeftAvionicsMasterGuard", 0) ipc.control(66587, 8026) ipc.sleep(400) ipc.writeLvar("L:LeftAvionicsMaster", 0) ipc.control(66587, 8027) ------------------------------------------------------------ GEN -- LEFT Generator SWITCH TOGGLE elseif ipcPARAM == 130 then LVarSet = "L:LeftGenSwitch" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8027) -- right Generator SWITCH TOGGLE elseif ipcPARAM == 131 then LVarSet = "L:RightGenSwitch" val = 1 if ipc.readLvar(LVarSet) == 1 then val = 2 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8027) -- left Generator SWITCH on elseif ipcPARAM == 132 then ipc.writeLvar("L:LeftGenSwitch", 2) ipc.control(66587, 8027) -- left Generator SWITCH off elseif ipcPARAM == 133 then ipc.writeLvar("L:LeftGenSwitch", 1) ipc.control(66587, 8028) -- right Generator SWITCH on elseif ipcPARAM == 134 then ipc.writeLvar("L:RightGenSwitch", 2) ipc.control(66587, 8027) -- right Generator SWITCH off elseif ipcPARAM == 135 then ipc.writeLvar("L:RightGenSwitch", 1) ipc.control(66587, 8028) ------------------------------------------------------------ FUEL PUMPS -- Left fuel Pump on elseif ipcPARAM == 136 then ipc.writeLvar("L:LeftStbyFuelPump", 1) ipc.control(66587, 8028) -- Left fuel Pump off elseif ipcPARAM == 137 then ipc.writeLvar("L:LeftStbyFuelPump", 0) ipc.control(66587, 8027) -- right fuel Pump on elseif ipcPARAM == 138 then ipc.writeLvar("L:RightStbyFuelPump", 1) ipc.control(66587, 8028) -- right fuel Pump off elseif ipcPARAM == 139 then ipc.writeLvar("L:RightStbyFuelPump", 0) ipc.control(66587, 8027) ------------------------------------------------------------ Prop sync -- prop sync toggle elseif ipcPARAM == 140 then LVarSet = "L:PropSync" val = 0 val2 = 8027 if ipc.readLvar(LVarSet) == 0 then val = 1 val2 = 8028 end ipc.writeLvar(LVarSet, val) ipc.control(66587, val2) ------------------------------------------------------------ Ground spoiler -- Ground Spoiler switch on elseif ipcPARAM == 145 then ipc.writeLvar("L:GrndSpoilersSwitch", 1) ipc.control(66587,8034) -- Ground Spoiler switch off elseif ipcPARAM == 146 then ipc.writeLvar("L:GrndSpoilersSwitch", 0) ipc.control(66587,8034) -- Ground Spoiler switch toggle elseif ipcPARAM == 147 then LVarSet = "L:GrndSpoilersSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8034) ------------------------------------------------------------ Ice oBS lights -- Ice OBS lights on elseif ipcPARAM == 148 then ipc.writeLvar("IceOBSSwitch", 2) ipc.control(66587,8027) -- Ice OBS lights off elseif ipcPARAM == 149 then ipc.writeLvar("IceOBSSwitch", 0) ipc.control(66587,8028) ------------------------------------------------------------ Windshield Deice -- windshield deice on elseif ipcPARAM == 150 then ipc.writeLvar("LeftWSAntice", 2) ipc.writeLvar("RightWSAntice", 1) ipc.control(66587,8027) -- windshield deice off elseif ipcPARAM == 151 then ipc.writeLvar("LeftWSAntice", 1) ipc.writeLvar("RightWSAntice", 0) ipc.control(66587,8028) ------------------------------------------------------------ Airdata Deice -- airdata deice on elseif ipcPARAM == 152 then ipc.writeLvar("LeftAirData", 1) ipc.writeLvar("RightAirData", 1) ipc.control(66587,8027) -- airdata deice off elseif ipcPARAM == 153 then ipc.writeLvar("LeftAirData", 0) ipc.writeLvar("RightAirData", 0) ipc.control(66587,8028) ------------------------------------------------------------ Prop Deice -- Prop deice short on elseif ipcPARAM == 155 then val = 2 SWvar = ipc.readLvar("LeftPropDeice") if SWvar == 0 then val = 1 end ipc.writeLvar("LeftPropDeice", val) ipc.writeLvar("RightPropDeice", val) ipc.control(66587,8027) -- Prop deice off elseif ipcPARAM == 156 then ipc.writeLvar("LeftPropDeice", 1) ipc.writeLvar("RightPropDeice", 1) ipc.control(66587,8028) -- Prop deice long on elseif ipcPARAM == 157 then val = 0 SWvar = ipc.readLvar("LeftPropDeice") if SWvar == 2 then val = 1 end ipc.writeLvar("LeftPropDeice", val) ipc.writeLvar("RightPropDeice", val) ipc.control(66587,8027) ------------------------------------------------------------ Deice Auto cycle -- CCT Auto Cycle Switch elseif ipcPARAM == 158 then ipc.writeLvar("L:AutoAnticeCycle", 2) ipc.control(66587, 8028) ipc.sleep(400) ipc.writeLvar("L:AutoAnticeCycle", 1) ipc.control(66587, 8027) ------------------------------------------------------------ warning mute --warning mute switch toggle elseif ipcPARAM == 160 then LVarSet = "L:CapMuted" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8031) ipc.sleep(100) ipc.writeLvar("L:CapMuteSwitch", val) ipc.control(66587, 8031) ------------------------------------------------------------ TOCW test switch -- TOCW Testswitch ON elseif ipcPARAM == 165 then ipc.control(66587, 8021) ipc.writeLvar("L:TocwTestSwitch", 1) -- TOCW Testswitch OFF elseif ipcPARAM == 166 then ipc.control(66587, 8021) ipc.writeLvar("L:TocwTestSwitch", 0) ------------------------------------------------------------ signs -- Seatbelt on elseif ipcPARAM == 170 then ipc.writeLvar("L:FastenSeatbeltSigns", 1) ipc.control(66587, 8028) ipc.sleep(10) ipc.control(66587, 74) -- Seatbelt off elseif ipcPARAM == 171 then ipc.writeLvar("L:FastenSeatbeltSigns", 0) ipc.control(66587, 8027) ipc.sleep(10) ipc.control(66587, 74) -- no smoking on elseif ipcPARAM == 172 then ipc.writeLvar("L:NoSmokingSigns", 1) ipc.control(66587, 8028) ipc.sleep(10) ipc.control(66587, 74) -- no skmoking off elseif ipcPARAM == 173 then ipc.writeLvar("L:NoSmokingSigns", 0) ipc.control(66587, 8027) ipc.sleep(10) ipc.control(66587, 74) ------------------------------------------------------------ feathering -- engine 1 (LEFT) elseif ipcPARAM == 176 then ipc.writeLvar("L:UnFeather", -1) ipc.control(66587, 1420) ipc.control(66587, 8029) -- knob sound -- no engine elseif ipcPARAM == 177 then ipc.writeLvar("L:UnFeather", 0) ipc.control(66587, 8029) -- knob sound -- engine 2 (RIGHT) elseif ipcPARAM == 178 then ipc.writeLvar("L:UnFeather", 1) ipc.control(66587, 1421) ipc.control(66587, 8029) -- knob sound ------------------------------------------------------------ engine starting -- select engine 1 (LEFT) elseif ipcPARAM == 180 then if ipc.readLvar("L:StartMasterKnob") == 2 then ipc.writeLvar("L:StartMasterKnob", 1) ipc.display("no engine selected...") ipc.sleep(1000) elseif ipc.readLvar("L:StartMasterKnob") == 1 then ipc.writeLvar("L:StartMasterKnob", 0) ipc.display("left engine selected...") ipc.sleep(1000) end -- select engine 2 (RIGHT) elseif ipcPARAM == 181 then if ipc.readLvar("L:StartMasterKnob") == 0 then ipc.writeLvar("L:StartMasterKnob", 1) ipc.display("no engine selected...") ipc.sleep(1000) elseif ipc.readLvar("L:StartMasterKnob") == 1 then ipc.writeLvar("L:StartMasterKnob", 2) ipc.display("right engine selected...") ipc.sleep(1000) end -- unselect engines elseif ipcPARAM == 182 then ipc.writeLvar("L:StartMasterKnob", 1) ipc.display("no engine selected...") ipc.sleep(1000) -- Feathering and starting selected engine ----------------- elseif ipcPARAM == 185 then -- Feathering and starting left engine if ipc.readLvar("L:StartMasterKnob") == 0 then ipc.control(66587, 1420) ipc.control(66587, 8029) -- knob sound ipc.display("feathering left engine...") ipc.sleep(8000) -- waiting for feathering ipc.display("feathering left engine...\n Starting left engine") ipc.writeLvar("L:LeftStart", 1) ipc.writeLvar("L:StartOneToggle", 1) ipc.writeLvar("L:LeftStartCheck", 1) ipc.writeLvar("L:LeftStartTimer", 1) end -- Feathering and starting right engine if ipc.readLvar("L:StartMasterKnob") == 2 then ipc.control(66587, 1421) ipc.control(66587, 8029) -- knob sound ipc.display("feathering right engine...") ipc.sleep(8000) -- waiting for feathering ipc.display("feathering right engine...\n Starting right engine") ipc.writeLvar("L:RightStart", 1) ipc.writeLvar("L:StartTwoToggle", 1) ipc.writeLvar("L:RightStartCheck", 1) ipc.writeLvar("L:RightStartTimer", 1) end ipc.display("") -- abort starting sequence (stop) for selected engine ----------------- elseif ipcPARAM == 186 then -- right engine stop if ipc.readLvar("L:StartMasterKnob") == 2 then -- Open the stop switch guard RSG = ipc.readLvar("L:RightEngStopSwitchGuard") if RSG == 0 then ipc.writeLvar("L:RightEngStopSwitchGuard", 1) ipc.control(66587, 8010) end -- Press the stop switch ipc.sleep(700) ipc.writeLvar("L:StopTwoToggle", 1) ipc.control(66587, 100001) ipc.control(66587, 8042) ipc.control(66587, 16) ipc.control(66301) ipc.control(66587, 100002) ipc.sleep(200) ipc.writeLvar("L:StopTwoToggle", 0) ipc.control(66587, 8042) -- Close the stop switch guard ipc.sleep(200) ipc.writeLvar ("L:RightEngStopSwitchGuard", 0) ipc.control (66587, 8010) end -- left engine stop if ipc.readLvar("L:StartMasterKnob") == 0 then -- Open the stop switch guard LSG = ipc.readLvar("L:LeftEngStopSwitchGuard") if LSG == 0 then ipc.writeLvar("L:LeftEngStopSwitchGuard", 1) ipc.control(66587, 8010) end -- Press the stop switch ipc.sleep(700) ipc.writeLvar("L:StopOneToggle", 1) ipc.control(66587, 100001) ipc.control(66587, 8042) ipc.control(66587, 15) ipc.control(66300) ipc.control(66587, 100002) ipc.sleep(200) ipc.writeLvar("L:StopOneToggle", 0) ipc.control(66587, 8042) -- Close the stop switch guard ipc.sleep(200) ipc.writeLvar ("L:LeftEngStopSwitchGuard", 0) ipc.control (66587, 8010) end ipc.display("engine starting sequence stopped") ipc.sleep(1000) ipc.display("") -------------------------------------------------------------- -- starting selected engine ----------------- elseif ipcPARAM == 187 then -- starting left engine if ipc.readLvar("L:StartMasterKnob") == 0 then ipc.writeLvar("L:LeftStart", 1) ipc.writeLvar("L:StartOneToggle", 1) ipc.writeLvar("L:LeftStartCheck", 1) ipc.writeLvar("L:LeftStartTimer", 1) end -- starting right engine if ipc.readLvar("L:StartMasterKnob") == 2 then ipc.writeLvar("L:RightStart", 1) ipc.writeLvar("L:StartTwoToggle", 1) ipc.writeLvar("L:RightStartCheck", 1) ipc.writeLvar("L:RightStartTimer", 1) end -- toggle gust locks elseif ipcPARAM == 190 then LVarSet = "L:GustLocks" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 141) --Ground power switch toggle elseif ipcPARAM == 195 then LVarSet = "L:GndPowerSwitch" LVar2Set = "L:PowerCartVis" val = 0 val2 = 1 if ipc.readLvar(LVarSet) == 0 then val = 1 val2 = 0 end ipc.writeLvar(LVar2Set, val2) ipc.sleep (300) ipc.writeLvar(LVarSet, val) ipc.control(66587, 8027) -------------------------------------------------------------- -- yellow attention get switch elseif ipcPARAM == 198 then ipc.writeLvar("L:LeftAmberAtgetSwitch", 1) ipc.control(66587,2090) ipc.control(66587,8044) ipc.sleep(400) ipc.writeLvar("L:LeftAmberAtgetSwitch", 0) ipc.control(66587,2091) ipc.control(66587,8045) -------------------------------------------------------------- -- Anti Skid on elseif ipcPARAM == 200 then ipc.writeLvar("L:AntiSkid", 1) ipc.control(66587,8029) -- Anti Skid off elseif ipcPARAM == 201 then ipc.writeLvar("L:AntiSkid", 0) ipc.control(66587,8029) -- Anti Skid toggle elseif ipcPARAM == 202 then LVarSet = "L:AntiSkid" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) ipc.control(66587, 8029) --------------------------------------------------------------------- end ------------------------------------------------------------------------------- -- you can delete this part below the lines if you don't use a VRInsight device ------------------------------------------------------------------------------- ------------------------------------- buffer = ipc.readLvar("L:AltSelAlt")/100 if buffer <= 0 then buffer = 0 end com.write(dev, string.format("ALT%03d", buffer), 8) ------------------------------------- buffer = ipc.readLvar("L:HDGBug") com.write(dev, string.format("HDG%03d", buffer), 8) -- ipc.display(ipc.readLvar("L:AltSelAlt")) -- ipc.sleep(1000)
  5. Thanks for your answers! I have found out that even with the FSx standard planes the MCP is reading their AP values and updating then the MCP displays. Thought there where an other way round possible... But doesn't matter - was jus a thought. Happy new year!
  6. Hi Pete, hope you have a nice christmas! With the help of some topics here in the forum I managed to write values in the MCP Combo Display As example here is the code for J41: buffer = ipc.readLvar("L:AltSelAlt")/100 com.write(dev, string.format("ALT%03d", buffer), 8) What I wonder know is, if it is possible to read a value out of the MCP Combo display? Like in the example above writing to the ALT display, know reading the shown ALT out of the display... I made several attempts with com.read but you know that I'm no programer, so this was without success... Is this possible and if yes, how? thanks very much, Günter
  7. Hello Paul, many thanks! But I use your two LUAs since years now :wink: They are very good!
  8. Hello Pete, thanks for the hint. But I have tried both... I will have a look into it again if there's time. MD11 was working, but A2A B377 or J41 not. All three work with "F2" reversers, but maybe theres a difference between jetengines and propellers? Maybe I will try with some propeller-offsets again...
  9. ok, just to complete this thread if anyone is interested: I managed to get it working. I could press a button and pull the throttle forward what is then acting as reverser. Full throttle means then about 50% N1 reverse thrust. Unfortunaltely I found out, that the most complex addons use some other kind of reverse thrust. Most work well with pressing "F2" but not then with my LUA. Don't know why. Tried several ways to get it solved. So I gave up, because that is really not #1 of my list :wink: Just wanted to try it a bit...
  10. ooooooh nooooo, disregard!!! Have found the error (was between my two ears). Things were screwed up... I'm very sorry to steal your time with this. I don't know why I just see the error AFTER posting here in this forum. Have searched excessive before... So, I'm going on with this reverser thing ;-)
  11. will send you my log via mail... I have found this little section inside the log: 152179 WRITElua 310A, 1 bytes: 08 . 152179 Monitor IPC:310A (U8) = 8 152179 WRITElua 310A, 1 bytes: 03 . 152241 Monitor IPC:310A (U8) = 3 does it write "8" AND "3" ??? I have also changed my LUA to your suggestion ipc.writeUB(0x310A, 8) very interested what you can see out of my logfile... thanks very much, Günter
  12. Hi Pete, sorry I forgot about that thread... Now I jumped in again and stuck with offset 310A I have a simple LUA containing ipc.writeUB(0x310A, 8) and nothing else. This should normally disable the throttle, right? What happens here is, that aileron and elevator are disabled for 10 seconds, but throttle and rudder are working. And I have tried several values instead of the "8" and nothing changes... my FSUIPC version is 4.637 thank you very much, Günter
  13. I don't know how GoFlight modules work. But as long as you can assign a button in FSUIPC to your hardware you can use LUAs or Macros.
  14. I installed both programms (14 days trial)... but...huuuhh.... way over my computer knowledge. I will fiddle around with it and try to get into the programs and stuff... hopefully. Will report back! No need to hurry for anything, Pete. As I said, it is only from time to time hat the connections is not working, so its not an important issue! thanks for all the support! Günter
  15. Good morning, Pete. Yes, I reset my device everytime before connecting SerialFP2. Thats a standard procedure. (But I'm not sure if I reset it everytime, before starting FSX or starting a flight - will take care of that) And yes, I have had same problems during Beta. But now I have a complete new system (but also Win7 64) and I have hoped, therefore the "problems" where solved. System is much better now and I have absolutely no problems with nearly full settings in FSX, but this little connecting problems stays... I have made a bunch of screenshots of my device manager and the COM settings. Maybe you can see if sth is didfferent to your system. FTDI driver is the latest thank you very much, Günter
  16. Yes, I know that and I wait till FSX ends thouroughly, I swear :wink: This issue also happens if I have a freshly started Widnows, so couldn't be a FSX overlap. That something is using this COM port could be, but I have no idea how to check what this could be or why windows isn't it releasing? I have several hardware: X52 pro 2 Saitek throttle quadrants BU836X and a Logitech extreme rebuilt as a little switch panel Everything is working fine Printer and Scanner is normally switched off (electricity off!) and so far no more hardware... Anyway it is not such a big problem as just one of 10 FSX flights is affected. I will google a bit around; maybe I can find out what windows does with COM ports. thanks, will report back if I find a solution, Günter
  17. ok, happened right now: ********* FSUIPC4, Version 4.628 by Pete Dowson ********* Reading options from "F:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.ini" Trying to connect to SimConnect Acc/SP2 Oct07 ... User Name="Günter Steiner" User Addr="adress removed to get not spammed" FSUIPC4 Key is provided WIDEFS7 not user registered, or expired Running inside FSX on Windows 7 (using SimConnect Acc/SP2 Oct07) Module base=61000000 Wind smoothing fix is fully installed DebugStatus=15 78 System time = 03/11/2010 21:45:10 94 FLT UNC path = "\\CANNELLONI-PC\Users\Cannelloni\Documents\Flight Simulator X-Dateien\" 94 FS UNC path = "F:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\" 936 LogOptions=80000000 00000051 936 SimConnect_Open succeeded: waiting to check version okay 952 VRI port 1 "COM3" failed to open 952 VRI driver port 1 "COM2" also opened 4680 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 4680 Initialising SimConnect data requests now 4680 FSUIPC Menu entry added 4712 Ready Flags: Ready-To-Fly=N, In Menu=Y, In Dlg=Y 4727 \\CANNELLONI-PC\Users\Cannelloni\Documents\Flight Simulator X-Dateien\EDDT Standard.FLT 4727 F:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\beech_baron_58\Beech_Baron_58.AIR 17831 F:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\PMDG747-400F\B747-400F.AIR 17831 Weather Mode now = Global 17831 \\CANNELLONI-PC\Users\cannelloni\documents\flight simulator x-dateien\747.FLT 20140 Ready Flags: Ready-To-Fly=N, In Menu=N, In Dlg=N 20312 Ready Flags: Ready-To-Fly=N, In Menu=Y, In Dlg=Y 57284 System time = 03/11/2010 21:46:07, Simulator time = 07:33:25 (06:33Z) 57939 Aircraft="PMDG 747-8F Lufthansa Cargo" 58532 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 58891 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N 60092 Exception 15 "WEATHER_UNABLE_TO_GET_OBSERVATION", Ref 2477, Index param -1 on Weather request type 5 62260 Advanced Weather Interface Enabled 64476 Weather Mode now = Theme 64585 Exception 15 "WEATHER_UNABLE_TO_GET_OBSERVATION", Ref 2481, Index param -1 on Weather request type 5 64632 Weather Mode now = Global 128498 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 128498 Sim stopped: average frame rate for last 70 secs = 26.3 fps 136470 \\CANNELLONI-PC\Users\Cannelloni\AppData\Roaming\Microsoft\FSX\Vorheriger Flug.FLT 136486 Exception 3 "UNRECOGNIZED_ID", Ref 2696, Index param -1 on unknown request! 147265 System time = 03/11/2010 21:47:37, Simulator time = 07:33:25 (06:33Z) 147265 *** FSUIPC log file being closed Average frame rate for running time of 70 secs = 26.3 fps Memory managed: 167 Allocs, 167 Freed ********* FSUIPC Log file closed *********** VSPE shows "Pair OK" as it should do, when FS is started. SerialFP2 is loading COM3 instead of COM4 when started (after(!) starting the flight) greetings, Günter
  18. Ah, I haven't known about that possibility. I have the same number of USB stuff there and everything was unchecked. Maybe my way with the energy-options does the same. I'll wait now till the next time the issue happens and show you the log file....
  19. yes, have that setting already made it through "advanced energy savings" (german OS maybe other naming) --> USB Settings --> deactivated (or is there an other setting, too?) will do next time... good point - "debug please" was added, but I have just added "LogExtras=4" now...
  20. nono, definitely not. As I wrote I do all flightplanning, FMC stuff, engine starting and the I think about starting SerialFP2. Its minutes after starting the flight. I never start it before! I will have a look into the log next time that happens and post it here... thanks, Günter
  21. Hello Pete, from time to time my "VRInsight Mod" isn't connecting thoroughly. Means, that I start a flight and start SerialFP2, but SerialFP2 is then connected to COM3 instead of COM4. Of course, the FSUIPC Mod isn't working then. Restarting SerialFP2 does not help Only solution for me is to restart FSX. My question is now, if it is possible to get it to work again in an other way? E.g a LUA which is reconnecting or whatever is neccessary... I don't know... Or would restarting the only solution? Background is, that I often forget to proof the connection immediatly after starting a flight. And then I setted up my flightplan, my FMC etc etc, maybe started engines and then notice that SerialFPs isn't connected to COM4. All "work" is then for nothing ;-) thank you very much, Günter
  22. Hello, I have written a little tutorial how to set up VRInsight devices, so that they could work as a native joystick with the help of the "FSUIPC VRInsight Mod"! I have tried to write it in a hopefully uncomplicated way with many pictures, so that everybody could set it properly up... Enjoy! Günter/guenseli FSUIPC_VRInsight_Mod.pdf
  23. Thanks Pete for sorting things up! Now, the new forum is a charm and much more comfortabel than before! Günter
  24. with a registered version of FSUIPC you can make mouse macros for the MD80 Pro or use LUA scripts. Mouse Macros are relatively easy to makejust a bit of nowledge. LUAs are a bit "heavier" to use and need "advanced" knowledge to create. Both, Macros and LUAs are very well documented in the FSUIPC Manuals!
  25. Many thanks for that list, Pete! the right variable is L:Mod_Xponder_mode I have already made another update with some further commands. will upload it in a few minutes! One question comes to my mind.... I will send you a mail, Pete. (Edit: Ah no, disregard! :wink: ) Thank you! Günter
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.