Menu

Tying together FGLive and a server

Users
George P
2012-01-30
2017-11-23
  • George P

    George P - 2012-01-30

    Hello,

    I would like to ask some advice.
    According to wiki Embedde Client is is possible to start FGLive (User Aplication) with a server (associated server?).

    The reason is to continue to integrate using FG as source for data displayed in the server. The server is intended to use SuperLayer and work with 2 defined displays (this part is tested). Those two windows are intended to be designed as HSI and FD displays when the connection with a flying FG is realized.

    The embedClient is launched as below (and FG is started too):
    java -jar ../lib/embedClient.jar -df=Layer.xml -hasServer=true -autoStart=true -config=../config/arinc.properties
    My assumption is that hasServer=true might be necessary.

    I need some advice for the next step: launching arincServer.jar within \j661-bin-0.52-Beta-3 using the same df (Layer.xml) as above e.g.
    java  ^
    -jar arincServer.jar ^
    -config = /config/arinc.properties ^
    -df=../j661-fgLive-bin-0.3/samples/Layer.xml

    What happens is that the Rose widget works correctly in the client while the launched server is not reacting to the FG movements (the Connect button is pushed too).
    It is obvious that I don't use the correct configuration to connect the client to the server but unfortunately I cannot deduce the rule.

    Thank you!
    George

     
  • George P

    George P - 2012-01-30

    Hello,

    I believe I found the answer.
    Launching the embedClient.jar with hasServer=true provide the embedClient with an own server steering the DF.

    For using an independent server hasServer must be set to false. The servers is launched individually and communicates with embedClient getting data from a flying FG a/c.

     
  • Hervé Girod

    Hervé Girod - 2012-01-30

    Hello,

    Yes, you are right. the optiions are  explained here: EmbeddedClient#Launch options

    If you don't put to false, you will launch a Client AND an associated Server

    Hervé

     
  • Mic Moy

    Mic Moy - 2017-11-21

    Hello,
    I would also like to ask some advice being new to ARINC 661. Using release 0.17, I have the demo HSI interface to FlightGear. Works perfect! I'm also able to change and add various widgets to the HSI with the J661 Editor.
    By the way I had to manulally edit <prop name="Filled" value="A661_TRUE"/> of the rectangle widget in the xml. For some reason this option doesn't seem to be available in the J661 editor.

     

    Last edit: Mic Moy 2017-11-23
  • Mic Moy

    Mic Moy - 2017-11-23

    Is it possible to get a toggle button to control switches within FlightGear? I have a toggle button working as expected using the editor/client/server. Text on the button will toggle and I can see the event in the editor window. I've also been able to add a controls tab in FGFSDemo.java and control the master battery switch (on/off) from FlightGear Client Console. But I haven't been able to get the A661 toggle button to control the master battery switch in FG. Below is the mods made to the xml's
    Here are the first few lines of GenericFlightGearTree.xml

    <FlightGearTree>
    <node name="controls">
    <node name="flight">
    <variable name="aileron&lt;span&gt;[0]&lt;/span&gt;" alias="aileron" type="float"/>
    </node>
    <node name="switches">
    <variable name="master-bat" type="float"/>
    </node>
    </node>

    Here are the first few lines of dataDrivenConfig.xml

    <dataProvider provider="FGLiveProvider">
    <property name="dataDriven" value="true"/>
    <property name="dataDriven.tic" value="100"/>
    <context name="testLayer" layerID="1" appliID="1"/>
    <input context="testLayer" widgetID="1" paramID="A661_STRING" equ="$1">
    <data name="latitude-deg"/>
    </input>
    <input context="testLayer" widgetID="56" paramID="A661_INNER_STATE_TOGGLE" equ="$1">
    <data name="master-bat"/>
    </input>

    Here is the addition of a toggleButton added into Layer.xml

       <a661_widget name="toggleButton" type="A661_TOGGLE_BUTTON">
      <model>
        <prop name="WidgetIdent" value="56" />
        <prop name="Enable" value="A661_TRUE" />
        <prop name="Visible" value="A661_TRUE" />
        <prop name="PosX" value="291" />
        <prop name="PosY" value="714" />
        <prop name="SizeX" value="2500" />
        <prop name="SizeY" value="1000" />
        <prop name="StyleSet" value="0" />
        <prop name="NextFocusedWidget" value="0" />
        <prop name="MaxStringLength" value="20" />
        <prop name="InnerState" value="A661_UNSELECTED" />
        <prop name="AlternateFlag" value="A661_TRUE" />
        <prop name="AutomaticFocusMotion" value="A661_FALSE" />
        <prop name="Alignment" value="A661_CENTER" />
        <prop name="String" value="Bat On" />
        <prop name="AlternateString" value="Bat Off" />
      </model>
    
     

    Last edit: Mic Moy 2017-11-23

Anonymous
Anonymous

Add attachments
Cancel