guenseli

Explanation of LINDAs GSX Door Service

Recommended Posts

Hello,

 

 

I tried to let LINDA handle the doors as I find it always a bit unrealistic that I AM, the proud pilot in command, have to handle all that doors in my airplane. That is what staff is for ;)

 

 

Ok, th difficulty is, that GSX gives just a few parameters for the timing when what service is started or finished. And, as good as GSX is, the devloper is not very cooperative to implement further variables which could be read by external addons like LINDA or FS Captain etc. Don't know why, but ok.

 

 

So, I've done my best to "compute" it and have now created a "GSX Door Service" as part of a few LINDA modules.

(Currently the PMDG 737, 777 and Majestic Dash 8).

 

Additonally in the 777, the DOOR page on the Lower DU comes up - when you are not in checklist mode.

 

 

 

What does GSX Door Service do:

When you call a service like deboarding, catering and boarding, LINDA will now open the doors for you and close after the service is finished.

When you call the refuel truck, LINDA will open the custom fuel pages of that addon, means with PMDG, the CDU2 opens with the fuel page, with the Majestic Dash 8, the MJC Control program opens.

 

Additonally in the 777, the FUEL page on the Lower DU comes up - when you are not in checklist mode.

 

 

 

 

User could copy and implement that codes in other addon modules if they like.

There's a section "Specific Addon Settings", where programers should tell LINDA what to do when that certain action is needed, like open doors, etc.

 

 

The following lines are important for all users of the LINDA modules with GSX Door service:

 

function GSX_Door_Service ()
 
    ------- comment/uncomment what you need for your addon
     --GSX_show ()
     GSX_Deboarding ()
     GSX_Catering_front ()
     GSX_Catering_back ()
     GSX_Refueling ()
     GSX_Boarding ()
end
 
 
if you do NOT LIKE one part of the LINDA door service, please comment that line.
So, e.g. if you do not like to have handle LINDA all services except deboarding and boarding, the functions looks as following:
 
function GSX_Door_Service ()
 
    ------- comment/uncomment what you need for your addon
     --GSX_show ()
     GSX_Deboarding ()
     --GSX_Catering_front ()
     --GSX_Catering_back ()
     --GSX_Refueling ()
     GSX_Boarding ()
end

 

(GSX_show is just for testing and should never be activated.

 

 

 

 

If you like to delete the LINDA GSX Door Service at all, please comment that line:

 

 
function Timer ()
 
GSX_Door_Service ()
 
...
 
 
to
 
 
function Timer ()
 
--GSX_Door_Service ()
 
....
 
 
Hope you like it and a happy new year!
 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,

 

I find to missing lines to have it working perfectly :

 

function GSX_Catering_front ()

    GSXCatering = ipc.readLvar('FSDT_GSX_CATERING_STATE')
    GSXCatTruck1 = ipc.readLvar('FSDT_Catering_truck_catwalk1')
    GSXManWalk1 = ipc.readLvar('FSDT_Catering_truck_man1')
    CatManCount1 = ipc.get("CatManCount1")
    CatPhase1 = ipc.get("CatPhase1")
    if GSXCatTruck1 == nil then GSXCatTruck1 = 0 end

    -- open door front
    if GSXCatTruck1 > 0 and GSXCatTruck1 < 99 and CatPhase1 == 0 then
        ipc.set("CatPhase1", 1)
        GSX_Door_R_Front_open ()

    end

    -- close doors front
    if CatManCount1 < 3 and CatPhase1 == 1 then
            if GSXManWalk1 == 1000 then
            CatManCount1 = CatManCount1 + 1
            ipc.set("CatManCount1", CatManCount1)
            ipc.sleep(2000)
            end
    elseif CatManCount1 == 3 and GSXCatTruck1 == 100 then
        ipc.set("CatPhase1", 2)
    end

    if CatPhase1 == 2 and GSXCatTruck1 == 100 then
        GSX_Door_R_Front_close ()



    elseif CatPhase1 == 2 and GSXCatTruck1 == 0 then
        ipc.set("CatManCount1",0)
        ipc.set("CatPhase1", 0)

    end

end



function GSX_Catering_back ()

    GSXCatering = ipc.readLvar('FSDT_GSX_CATERING_STATE')
    GSXCatTruck2 = ipc.readLvar('FSDT_Catering_truck_catwalk2')
    GSXManWalk2 = ipc.readLvar('FSDT_Catering_truck_man2')
    CatManCount2 = ipc.get("CatManCount2")
    CatPhase2 = ipc.get("CatPhase2")
    if GSXCatTruck2 == nil then GSXCatTruck2 = 0 end

    -- open door back
    if GSXCatTruck2 > 0 and GSXCatTruck2 < 99 and CatPhase2 == 0 then
        ipc.set("CatPhase2", 1)
        GSX_Door_R_Back_open ()

    end

    -- close doors back
    if CatManCount2 < 3 and CatPhase2 == 1 then
            if GSXManWalk2 == 1000 then
            CatManCount2 = CatManCount2 + 1
            ipc.set("CatManCount2", CatManCount2)
            ipc.sleep(2000)
            end
    elseif CatManCount2 == 3 and GSXCatTruck2 == 100 then
        ipc.set("CatPhase2", 2)
    end

    if CatPhase2 == 2 and GSXCatTruck2 == 100 then
        GSX_Door_R_Back_close ()

    elseif CatPhase2 == 2 and GSXCatTruck2 == 0 then
        ipc.set("CatManCount2",0)
        ipc.set("CatPhase2", 0)
    end

end


 

Share this post


Link to post
Share on other sites

Do we need to do anything specific to make it work, beyond just requesting GSX for a service? For example, assigning something to a LINDA button and then pressing it?

Share this post


Link to post
Share on other sites

Hello,

 

Great idea with the doors. Any chance this could be added to the FSLABS A320 module?

 

Cheers

Neil

 

Share this post


Link to post
Share on other sites

Hello, no as I do not have access to the FSLabs Door functions with LINDA (need to wait for the SDK)

Share this post


Link to post
Share on other sites

Hello,

Can someone tell me where to edit those lines ? Is it in LINDA or GSX ? I want to delete the auto open door.

Thanks,

Share this post


Link to post
Share on other sites
Posted (edited)

The code with be in the LINDA module for the aircraft. You do not edit the GSX. The code for auto open will be in the Timer() function in the aircraft folder. To isolate it, use the comment marker (- - 2 dashes no space) to stop all lines you don't want to run. This is better than deleting the lines because if you make a mistake or wish to reinstate the function you can do so. 

Edited by ScotFlieger

Share this post


Link to post
Share on other sites

Can you tell me the name of the file to edit please ? is this the correct location file \Prepar3D v4\Modules\linda\aircrafts\PMDG 777 ?

Thanks,

Share this post


Link to post
Share on other sites

The file to edit is the PMDG 777 actions.lua file. However, there is a quick way to get to it. Ensure that your are Sync-ed to PMDG 777 (in aircraft box and outlined in orange). Then click the EDIT button (to left) and click on the bottom right button in the dialog.

Share this post


Link to post
Share on other sites
On 21 March 2018 at 7:48 PM, guenseli said:

Hello, no as I do not have access to the FSLabs Door functions with LINDA (need to wait for the SDK)

Ok understood, thanks for the reply and great job on a fantastic program.

 

cheers

 

neil

Share this post


Link to post
Share on other sites
1 hour ago, ScotFlieger said:

The file to edit is the PMDG 777 actions.lua file. However, there is a quick way to get to it. Ensure that your are Sync-ed to PMDG 777 (in aircraft box and outlined in orange). Then click the EDIT button (to left) and click on the bottom right button in the dialog.

Thank you its working =)

Share this post


Link to post
Share on other sites

Is it not <shift><ctrl><F12>? Check Add Ons menu. 

PS. this is the Support forum for LINDA not general Flt Sim Support. 

Share this post


Link to post
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