-- 23.03.18/AH Flysimware Learjet 35A Controls: Engine Shutoff ein/aus -- Damit ich die beiden Buttons am Learjet Throttle auf einen anderen Button/Hebel legen kann -- Parameter: 1 = Linker Button, 2 = Rechter Button -- if ipcPARAM == 1 then LeftShutdown=ipc.readLvar("LEAR_SHUTOFF1") -- get left shutdown state -- DEBUG ipc.setdisplay(300,500,500,100) -- DEBUG ipc.lineDisplay("LEAR_SHUTOFF1 State:" .. LeftShutdown,1) -- End of debugging if LeftShutdown == 0 then LeftShutdown=1 -- change left shutdown to on -- DEBUG ipc.lineDisplay("Shut on...",2) else LeftShutdown=0 -- change left shutdown to off -- DEBUG ipc.lineDisplay("Shut off...",2) end ipc.writeLvar("LEAR_SHUTOFF1", LeftShutdown) -- set left shutdown state ipc.writeLvar("L:XMLSND70",1) -- switch sound -- DEBUG ipc.lineDisplay("Shutdown Var..." .. LeftShutdown,3) elseif ipcPARAM == 2 then -- Just for debugging RightShutdown=ipc.readLvar("LEAR_SHUTOFF2") -- get right shutdown state -- DEBUG ipc.setdisplay(300,500,500,100) -- DEBUG ipc.lineDisplay("LEAR_SHUTOFF2 State:" .. RightShutdown,1) -- End of debugging if RightShutdown == 0 then RightShutdown=1 -- change right shutdown to on -- DEBUG ipc.lineDisplay("Shut on...",2) else RightShutdown=0 -- change right shutdown to off -- DEBUG ipc.lineDisplay("Shut off...",2) end ipc.writeLvar("LEAR_SHUTOFF2", RightShutdown) -- set right shutdown state ipc.writeLvar("L:XMLSND70",1) -- switch sound -- DEBUG ipc.lineDisplay("Shutdown Var..." .. RightShutdown,3) end -- DEBUG ipc.sleep(5000) -- Delay Debug Window Display