Jump to content
The simFlight Network Forums

Do-27 key commands


guenseli

Recommended Posts

I have made some little LUA files for different aircrafts the last weeks and d'like to share them here.

Here are the ones for the (old but) famous Do-27 from Digital Aviation.

LUA commands

To get acces to the single commands you have to do the following:

(example for the PMDG J41)

1) copy the code below

2) insert it into an empty editor or wordpad file and save it as e.g. J41.LUA

3) open FSUIPC menu and choose LUA J41 from the drop down

4) insert different parameter numbers depending on the action you want (green field)

fr6tcbg5.jpg

Parameter numbers:

-- 1 Battery ON

-- 2 Battery OFF

-- 3 Avionics (COMM) ON

-- 4 Avionics (COMM) OFF

-- 5 Ignition (Starter) ON

-- 6 Ignition (Starter) OFF

-- 7 Generator (Alternator) ON

-- 8 Generator (Alternator) OFF

-- 9 Magneto ON

-- 10 Magneto OFF

-- 11 Magneto INC

-- 12 Magneto DEC

-- 13 CarbHeat ON

-- 14 CarbHeat OFF

-- 15 Pitot ON

-- 16 Pitot OFF

-- 17 Fuel Pump ON

-- 18 Fuel Pump OFF

-- 19 Landing Lights ON

-- 20 Landing Lights OFF

-- 21 Landing Lights Circuit ON

-- 22 Landing Lights Circuit OFF

-- 23 Cockpit Light ON

-- 24 Cockpit Light OFF

-- 25 Mixture ON

-- 26 Mixture OFF

-- 27 Brandhahn (Fuel Valve) ON

-- 28 Brandhahn (Fuel Valve) OFF

-- 29 Primer (Fuel Injection)

-- 30 starter ON

-- 31 starter OFF

-- 1 Battery ON
-- 2 Battery OFF
-- 3 Avionics (COMM) ON
-- 4 Avionics (COMM) OFF
-- 5 Ignition (Starter) ON
-- 6 Ignition (Starter) OFF
-- 7 Generator (Alternator) ON
-- 8 Generator (Alternator) OFF
-- 9 Magneto ON
-- 10 Magneto OFF
-- 11 Magneto INC
-- 12 Magneto DEC
-- 13 CarbHeat ON 
-- 14 CarbHeat OFF 
-- 15 Pitot ON 
-- 16 Pitot OFF 
-- 17 Fuel Pump ON
-- 18 Fuel Pump OFF
-- 19 Landing Lights ON
-- 20 Landing Lights OFF
-- 21 Landing Lights Circuit ON
-- 22 Landing Lights Circuit OFF
-- 23 Cockpit Light ON
-- 24 Cockpit Light OFF
-- 25 Mixture ON
-- 26 Mixture OFF
-- 27 Brandhahn (Fuel Valve) ON
-- 28 Brandhahn (Fuel Valve) OFF
-- 29 Primer (Fuel Injection)
-- 30 starter ON
-- 31 starter OFF





-- Battery switch ON
if ipcPARAM == 1 then   


	ipc.writeDD("281C", 1) 
	ipc.writeLvar("L:SoundRockerSwitch", 1)

end


-- Battery switch OFF
if ipcPARAM == 2 then   


	ipc.writeDD("281C", 0) 
	ipc.writeLvar("L:SoundRockerSwitch", 0)

end

-- Avionics switch ON
if ipcPARAM == 3 then   


	ipc.writeDD("2E80", 1) 
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(100)
	ipc.writeLvar("L:CircuitVor1", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(150)
	ipc.writeLvar("L:CircuitElectricalInstruments", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(100)
	ipc.writeLvar("L:CircuitInstruments", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(250)
	ipc.writeLvar("L:CircuitGPS", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

end


-- Avionics switch OFF
if ipcPARAM == 4 then   


	ipc.writeDD("2E80", 0) 
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(150)
	ipc.writeLvar("L:CircuitVor1", 0)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(250)
	ipc.writeLvar("L:CircuitElectricalInstruments", 0)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(100)
	ipc.writeLvar("L:CircuitInstruments", 0)
	ipc.writeLvar("L:SoundAutomat", 1)

	ipc.sleep(150)
	ipc.writeLvar("L:CircuitGPS", 0)
	ipc.writeLvar("L:SoundAutomat", 1)

end

-- Ignition switch ON
if ipcPARAM == 5 then   

    ipc.writeLvar("L:IgnitionMaster", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

end

-- Ignition switch OFF
if ipcPARAM == 6 then   

    ipc.writeLvar("L:IgnitionMaster", 0)
	ipc.writeLvar("L:SoundAutomatReset", 1)

end


-- GEN (Alternator) switch ON
if ipcPARAM == 7 then   

    ipc.writeLvar("L:CircuitAlternator", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

end

-- GEN (Alternator)switch OFF
if ipcPARAM == 8 then   

    ipc.writeLvar("L:CircuitAlternator", 0)
	ipc.writeLvar("L:SoundAutomatReset", 1)

end


-- Magneto ON
if ipcPARAM == 9 then   

    ipc.control(66026)
	ipc.writeLvar("L:SoundMagnetos", 1)

end

-- Magneto OFF
if ipcPARAM == 10 then   

    ipc.control(66023)
	ipc.writeLvar("L:SoundMagnetos", 1)

end


-- Magneto inc
if ipcPARAM == 11 then   

    ipc.control(66127)
	ipc.writeLvar("L:SoundMagnetos", 1)

end

-- Magneto dec
if ipcPARAM == 12 then   

    ipc.control(66126)
	ipc.writeLvar("L:SoundMagnetos", 1)

end


-- CarbHeat ON 
if ipcPARAM == 13 then   

    ipc.control(66029)
	ipc.writeLvar("L:SoundCarbHeat", 1)

end

-- CarbHeat OFF 
if ipcPARAM == 14 then   

    ipc.control(66030)
	ipc.writeLvar("L:SoundCarbHeat", 1)

end

-- Pitot ON
if ipcPARAM == 15 then   

    ipc.writeLvar("L:CircuitPitot", 1)
	ipc.writeLvar("L:SoundAutomat", 1)

end

-- Pitot OFF
if ipcPARAM == 16 then   

    ipc.writeLvar("L:CircuitPitot", 0)
	ipc.writeLvar("L:SoundAutomatReset", 1)

end


-- Fuel Pump ON
if ipcPARAM == 17 then   

    ipc.control(66340, 1)
	ipc.writeLvar("L:SoundAutomat", 1)

end



-- Fuel Pump OFF
if ipcPARAM == 18 then   

    ipc.control(66340, 0)
ipc.writeLvar("L:SoundAutomatReset", 1)

end



-- Landing Lights ON
if ipcPARAM == 19 then   

    ipc.writeLvar("L:LightLanding", 1)
	ipc.writeLvar("L:SoundRockerSwitch", 1)


end

-- Landing Lights OFF
if ipcPARAM == 20 then   

    ipc.writeLvar("L:LightLanding", 0)
	ipc.writeLvar("L:SoundRockerSwitch", 1)


end



-- Landing Lights Circuit ON
if ipcPARAM == 21 then   

    ipc.writeLvar("L:CircuitLandingLight", 1)
	ipc.writeLvar("L:SoundAutomat", 1)


end

-- Landing Lights Circuit OFF
if ipcPARAM == 22 then   

    ipc.writeLvar("L:CircuitLandingLight", 0)
	ipc.writeLvar("L:SoundAutomatReset", 1)


end

-- Cockpit Lights ON
if ipcPARAM == 23 then   

    ipc.writeLvar("L:LightCabinForward", 1)
    ipc.writeLvar("L:CockpitLightOn", 1)
	ipc.writeLvar("L:Light Panel", 1)

	ipc.writeLvar("L:SoundAutomat", 1)


end

-- Cockpit Lights OFF
if ipcPARAM == 24 then   

    ipc.writeLvar("L:LightCabinForward", 0)
    ipc.writeLvar("L:CockpitLightOn", 0)
	ipc.writeLvar("L:Light Panel", 0)

	ipc.writeLvar("L:SoundAutomatReset", 1)


end


-- Mixture ON
if ipcPARAM == 25 then   

    ipc.writeLvar("L:LeverMixture", 100)
	ipc.writeLvar("L:SoundMixture", 1)


end

-- Mixture OFF
if ipcPARAM == 26 then   

    ipc.writeLvar("L:LeverMixture", 0)
	ipc.writeLvar("L:SoundMixture", 1)


end


-- Brandhahn (Fuel Valve) ON
if ipcPARAM == 27 then   

    ipc.writeLvar("L:Brandhahn", 0)
	ipc.writeLvar("L:SoundBrandhahn", 1)


end

-- Brandhahn (Fuel Valve) OFF
if ipcPARAM == 28 then   

    ipc.writeLvar("L:Brandhahn", 1)
	ipc.writeLvar("L:SoundBrandhahn", 1)


end

-- Primer (Fuel Injection)
if ipcPARAM == 29 then   

    ipc.writeLvar("L:FuelInjection", 1)
	ipc.sleep(100)
	ipc.writeLvar("L:FuelInjection", 0)

end

-- starter on
if ipcPARAM == 30 then   

    ipc.writeLvar("L:GuardStarter", 1)
	ipc.sleep(50)
    ipc.control(66300, 1)


end


-- starter off
if ipcPARAM == 31 then   


    ipc.writeLvar("L:GuardStarter", 0)


end

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.