Board index FlightGear Development Aircraft Systems

Default position "OFF"

Modeling aircraft systems, like electrical stuff, hydraulics, pneumatics? Feel free to ask support.

Default position "OFF"

Postby StuartC » Mon Nov 14, 2016 7:12 pm

When you load an aircraft, the property tree shows a numbers of systems set as on from the start such as :-

controls/hydraulic/system/electric-pump

which is on by default.

How can I make that off by default without nasal if possible.?
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit

Re: Default position "OFF"

Postby sanhozay » Mon Nov 14, 2016 8:18 pm

Have you tried using the -set.xml file?

Something like:

Code: Select all
  <controls>
    <hydraulic>
      <system>
        <electric-pump type="bool">false</electric-pump>
      </system>
    </hydraulic>
  </controls>
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Default position "OFF"

Postby wlbragg » Mon Nov 14, 2016 8:19 pm

In the set file use

Code: Select all
    <controls>
   <hydraulic>
         <system>
            <electric-pump type="bool">false</electric-pump>
         </system>
      </hydraulic>
    </controls>


Edit:

Oops, duplicated your answer, yes this works.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4909
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Default position "OFF"

Postby StuartC » Mon Nov 14, 2016 8:46 pm

Thatnks I will have a play with that.
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 7:20 pm

so far so good with this and I'm getting where I want to be, exept for this:-

<electric>
<engine>
<generator type="bool">false</generator>
</engine>
</electric>

Fine for engine 0 but what if I need to se the condition on different engines ? Tried <engine[1]> etc, but it doesn't like that.
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit

Re: Default position "OFF"

Postby Necolatis » Wed Nov 23, 2016 7:25 pm

<engine n="1">
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1986
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 7:42 pm

<electric>
<engine n="1">
<generator type="bool">false</generator>
</engine n="1">
</electric>

Still doesn't work, in fact it fails at loading the set file with it.
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit

Re: Default position "OFF"

Postby Gijs » Wed Nov 23, 2016 7:43 pm

Code: Select all
<electric>
  <engine n="0">
    <generator type="bool">false</generator>
  </engine>
  <engine n="1">
    <generator type="bool">false</generator>
  </engine>
</electric>

Note how you don't declare the type twice on the generator tags, it's the same for engine number ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9380
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 7:51 pm

Ah, right.

Final question for tonight.

controls/switches/fuel/transfer-pump[1]

This doesn't fit with the above format

Pump zero works fine with

<switches>
<fuel>
<transfer-pump type="bool">false</transfer-pump>
</fuel>
</switches>
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit

Re: Default position "OFF"

Postby sanhozay » Wed Nov 23, 2016 8:09 pm

Does this work?

Code: Select all
<switches>
  <fuel>
    <transfer-pump n="0" type="bool">false</transfer-pump>
    <transfer-pump n="1" type="bool">false</transfer-pump>
  </fuel>
</switches>
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Default position "OFF"

Postby Richard » Wed Nov 23, 2016 8:10 pm

StuartC wrote in Wed Nov 23, 2016 7:51 pm:Ah, right.
<switches>
<fuel>
<transfer-pump type="bool">false</transfer-pump>
</fuel>
</switches>

[/quote]

Code: Select all
<switches>
      <fuel>
        <transfer-pump n="0" type="bool">false</transfer-pump>
        <transfer-pump n="1" type="bool">false</transfer-pump>
      </fuel>
    </switches>


I deliberately did a n="0" as the summat/property-name[0] is the same as summat/property-name - and I think it makes the XML more readable; but it's up to you which form to use.
Richard
 
Posts: 716
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: Default position "OFF"

Postby StuartC » Wed Nov 23, 2016 8:14 pm

Fantastic, yes that works a treat.

thanks.
StuartC
 
Posts: 2737
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2018.3.2
OS: W10 64 bit


Return to Systems

Who is online

Users browsing this forum: No registered users and 1 guest