Jump to content
The simFlight Network Forums

FlyingCoder

Members
  • Posts

    59
  • Joined

  • Last visited

Posts posted by FlyingCoder

  1. Hi john, this is what i came out with. I believe its wrong because im getting weird weird numbers but im trying to understand the flow. Result should be 1 to 6 respectively but getting none of the one i wanted.. Do correct me on where i should put such variable like test and the L:FSDT_GSX_CATERING_STATE.

     

    FLOAT64 test;
    FSUIPC_Write(0x0D6C, 4, &test, &result);
    FSUIPC_Write(0x0D70, 40, "L:FSDT_GSX_CATERING_STATE", &result);
    FSUIPC_Read(0x0D6C, 4, &test, &result);
    FSUIPC_Process(&result);
    cout << test;

     

  2. 20 minutes ago, John Dowson said:

    The FSUIPC SDK. There is no access to lvars from the P3D SDK. Otherwise, you can use the Panels.dll directly, as you do in the posted code fragment. This is what FSUIPC uses internally. You would need to run your program as a dll plugin to P3D to get access to the Panels.dll though.
     

    Hi john, thanks for the reply. Based on the code i posted, i kept getting error like Expected a member name, syntax error ( i feel i was 1 or 2 steps close but the error is just making me wonder. Cause of that, i tried looking for alternatives. I am using C++ CLR Win forms btw to do my software. Maybe like you said, as a DLL.

    My program is like ACARS that tracks pilot flight. With an addition to passenger announcement, meals etc similar like fspassenger. However, i am intending to let my program to run a standalone and also being able to get data from sim(which already works). Now im trying to learn to implement much more stuff like GSX boarding, deboarding etc so i can integrate them to make one full complete system. Thats what i have in mind.

    As to what i have explain, correct me if im wrong, STANDALONE PROGRAM -> COMMUNICATES WITH DLL TO READ VARIABLE OF GSX -> PASS BACK TO MY PROGRAM. is this the flow if i am right ?

     

  3. Hi ! I would like to ask, is it possible to read variables from GSX addon manager or panel? I am making my own software to simulator passenger boarding, catering etc, however, based on the manual from GSX, it requires me to read or retrieve variables. Here is the code from GSX manual. I am using C++ winform CLR to develop the software. Hope to get some help and clarification. Thank you 🙂

     

    Heres a C/C++ example code to read an L: variable safely:
    
    // Panels will be filled at start by PANELS.DLL
    
    EXTERN_C PANELS *Panels = NULL;
    if (Panels)
    {  
    	int idVar = -1;  
    	FLOAT64 value = 0;  // check if the variable exists  
    	idVar = Panels->check_named_variable(“FSDT_GSX_CATERING_STATE”);  // read the value only if registration succeeded.  
    	if (idVar != -1)    
    		value = Panels->get_named_variable_value(idVar);
    }

     

  4. Hi guys, first of all, nmot sure if this is the right section to ask but i would like to ask, how do i add new items under the Addon's section? Currently, i am developing a software and i would like my pilots to access it via the ADDONS button rather than having to start them externally. I have no clue how and i am currently using FSUIPC for my software. So, when my pilots press the Addons, my application name will appear. How do i do that?

  5. Hi paul, i just realised that. Anyway, im trying what you asked to do. Search through the array but im not sure if im doing it the right way.  This is how i did it but i kept getting Not in any airport.

     

    For Each item As FsAirport In airports
                    If item.ICAO = getDeptICAO Then
                        Noairportlbl.Text = ""
                        arrdebuglbl.Text = ""
                        GreenText1.Value = "You are at your departure location!"
                        GreenText2.Value = 10
                    ElseIf item.ICAO = getArrivalICAO Then
                        Noairportlbl.Text = ""
                        deptdebuglbl.Text = ""
    
                        GreenText1.Value = "You are at your destination location!"
                        GreenText2.Value = 10
    
                        'ElseIf airports(0).ICAO = "" Then
                        '    deptdebuglbl.Text = ""
                        '    arrdebuglbl.Text = ""
                        '    Noairportlbl.Text = "Not in any airport"
    
    
                    Else
                        deptdebuglbl.Text = ""
                        arrdebuglbl.Text = ""
                        Noairportlbl.Text = "Not in any airport"
    
    
                    End If
                Next

     

×
×
  • 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.