Jump to content
The simFlight Network Forums

AeroSoft Twin Otter starter


PropDrvr

Recommended Posts

AeroSoft Twin Otter Engine Start - May be a bit clunky being my first shot at L:VARs but it works.

    -- 1 = Starter L On
        -- 2 = Starter L Off
    -- 3 = Starter R On
        -- 4 = Starter R Off


        -- Set to Zero
        ipc.writeLvar("L:STARTER",0)

    -- Starter L On
    if ipcPARAM == 1 then


        dh6_starter = "L:starter"
        val = 0

        if ipc.readLvar(dh6_starter) == 0  then
           val = 1

        end
        ipc.writeLvar(dh6_starter, val)
                ipc.writeLvar("L:CAT_SWITCH_ON", 1)


                -- Starter L Off
    elseif ipcPARAM == 2 then

        dh6_starter = "L:starter"
        val = 0

        if ipc.readLvar(dh6_starter) == 1  then
           val = 0

        end
        ipc.writeLvar(dh6_starter, val)
                ipc.writeLvar("L:CAT_SWITCH_ON", 2)



    -- Starter R On
    elseif ipcPARAM == 3 then

        dh6_starter = "L:starter"
        val = 2

        if ipc.readLvar(dh6_starter) == 0  then
           val = 3

        end
        ipc.writeLvar(dh6_starter, val)
                ipc.writeLvar("L:CAT_SWITCH_ON", 3)


                -- Starter R Off
    elseif ipcPARAM == 4 then

        dh6_starter = "L:starter"
        val = 3

        if ipc.readLvar(dh6_starter) == 3  then
           val = 4

        end
        ipc.writeLvar(Cat_starter, val)
                ipc.writeLvar("L:CAT_SWITCH_ON", 4)

        end

  • Upvote 1
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.