Jump to content
Sign in to follow this  
Optilium

Edit panel state with aircraft.cfg ?

Recommended Posts

On 7/5/2020 at 12:33 PM, Optilium said:

gauge55=Gauge_C172, 0.0

That is your problem. There are several errors:

1) the position parameters x,y,w,h must have a comma (,) not a period (.) A correct entry here would be 0, 0, 1, 1

2) all XML gauges entries have two parts separated by an exclamation symbol (!). The first part is the name of the .CAB file or the folder name in which the .xml script is stored. The second part is the name of the .xml file itself.

Place the logic gauge in its own folder such as C172_Logic and use a panel.cfg entry like this:

gauge55=C172_Logic!Gauge_C172, 0, 0, 1, 1


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Yep. So I place the Gauge_C172.xml in the C172_logic folder, which is in the Gauge Folder of FSX. 

I correct the line as required, correcting the title, putting a comma. Howewer, buttons aren't on the right configuration...But, by using XML_Vars, I've lines, similar to those in the Gauge_C172.xml which have been added:

ID=1 KEY_TOGGLE_TAXI_LIGHTS        1.0000000    0X1

ID=2 KEY_TOGGLE_NAV_LIGHTS        1.0000000    0X1

ID=3 KEY_STROBES_TOGGLE        1.0000000    0X1

D=4 KEY_LANDING_LIGHT_TOGGLE        1.0000000    0X1

So the values have been detected. Howewer, it doesn't appear to work in the cockpit.

 

Don't understand...

According to https://www.fsdeveloper.com/forum/threads/initialise-set-variable-values-on-aircraft-load-up.443571/  I put a

gauge19=C172_logic!Gauge_C172, 0, 0, 1, 1

...in [VCockpit01]. I check as well by changing L by a K in...

 

<Gauge Name="Gauge_C172" Version="1.0">
  <Element>
    <Select>
      <Value>
        (L:FirstLoad,bool) !
        if{
             1 (>K:KEY_TOGGLE_ELECT_FUEL_PUMP,bool)
             0 (>L:KEY_LANDING_LIGHTS_TOGGLE, bool)
             1 (>L:KEY_TOGGLE_TAXI_LIGHTS, bool)
             0 (>L:KEY_TOGGLE_NAV_LIGHTS, bool)
             1 (>L:KEY_STROBES_TOGGLE, bool)
             0 (>K:KEY_PITOT_HEAT_TOGGLE, bool)
        }
        1 (>L:FirstLoad,bool)
        }
      </Value>
    </Select>
  </Element>
</Gauge>

 

 

Edited by Optilium

Share this post


Link to post
Share on other sites

YAHAHAAAAAA!! 

Success ! In fact, it doesn't work for default fsx aircraft. Howewer, I tried with my L-1011 from CaptainSim. Everything works perfectly ! The Xml vars, doesn't work as well with default aircraft. I only had flight controls variable. With the l1011, it works perfectly. I have all the switchs (more than 3000 variables...)

Actually, I had to move a file ( l112.sys.dll ) which init the aircraft when loaded. So even with an init gauge, it started the aircraft. 

 

Well, thank you very much for your patience BudSurf and n4gix. I learned quite lot of things and I should be able to do it with all my aircraft now. Thanks !

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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...