-- 25.05.17/AH Turbine Duke V2 Pitot Heat [ipc.control(66072)] and Stall Heat (L:Stall_Heat) -- 14.05.18/AH Windshield De-Ice, Propeller De-Ice -- Parm : 1 -> Toggle Pitot/Stall Heat -- Parm : 2 -> Toggle Windshield De-Ice -- Parm : 3 -> Toggle Propeller De-Ice -- Parm : 4 -> Propsync on -- Parm : 5 -> Propsync off -- Achtung ! Da Propeller De-Ice auch von der FSX-Funktion "Anti-Ice Toggle" geschaltet wird, -- wird die Funktion Parm=3 doch nicht benutzt. Ich lasse den Code aber mal hier drin. -- -- Pitot/Stall Toggle -- if ipcPARAM == 1 then -- Stellung Stall Heat holen PitotPos = ipc.readLvar("L:Stall_Heat") -- Pitot2/Stall Heat aus ? if ( PitotPos == 0) then -- dann Pitot/Stall ein ipc.control(66072) sound.play("switch_small.wav") --switch sound (FSX sound-Folder) ipc.sleep(300) PitotPos = 1 ipc.writeLvar("L:Stall_Heat", PitotPos) else -- sonst Pitot/Stall aus PitotPos = 0 ipc.writeLvar("L:Stall_Heat", PitotPos) ipc.sleep(300) ipc.control(66073) sound.play("switch_small.wav") --switch sound (FSX sound-Folder) end return -- -- Windshield De-Ice Toggle -- elseif ipcPARAM == 2 then wshielddi=ipc.readLvar("L:Duke_Wshield_Heat") -- Windshield De-Ice aus ? if wshielddi == 0 then ipc.writeLvar("L:Duke_Wshield_Heat", 1) -- Toggle Windshield De-Ice else ipc.writeLvar("L:Duke_Wshield_Heat", 0) -- Toggle Windshield De-Ice end return -- -- Windshield De-Ice Toggle -- elseif ipcPARAM == 3 then propdi=ipc.readLvar("L:Duke_Wshield_Heat") -- Propeller De-Ice aus ? if propdi == 0 then ipc.control(66338) -- Toggle Propeller De-Ice else ipc.control(66338) -- Toggle Propeller De-Ice end return -- -- Propsync on (Toggle if not on) -- elseif ipcPARAM == 4 then propsync=ipc.readUD(0x2EC8) -- Get actual state of prop sync if propsync ~= 1 then -- prop sync state not equal on=1 ipc.control(66287, 1) -- Toggle Propsync to on end return -- -- Propsync off (Toggle if not off) -- elseif ipcPARAM == 5 then propsync=ipc.readUD(0x2EC8) -- Get actual state of prop sync if propsync ~= 0 then -- prop sync state not equal off=0 ipc.control(66287, 1) -- Toggle Propsync end return -- -- alles andere keine gueltige Schalterstellung -- else ipc.lineDisplay("PARAM not implemented") ipc.sleep(3000) end