Hi Gareth,
I think you need to have the top level node <aircraft> in your included
xml
as well, so something like:
<aircraft>
<section name="foo">
<bar...>
</section>
</aircraft>
The problem with using includes like that is that they get replaced with
the included nodes again if you use the settings tool to save some values
into the airframe file.
This is because the whole xml structure is loaded in the parser and then
written back to the file (and it doesn't know that some of the nodes came
from an include).
Any good ideas on how to improve/solve this would be very much
appreciated.
Cheers, Felix
On Fri, Jun 29, 2012 at 9:37 PM, Gareth Roberts <
address@hidden> wrote:
Hi all,
I recently noticed the <include href="foo.xml" /> in one of esden's
example airframes.
I'd like to use this as I have a bunch of identical aircraft, for which
the gains may be slightly different but everything else is identical.
I know that if I copy the same file 5 times and change a module import
or
whatever I'll forget to alter them all.
It appears to work for simple cases (a single section) but when I
attempt
to drag in more, such as <firmware />, it fails.
For example, in pseudo-xml:
aircraft.xml
<DOCTYPE>
<airframe name="foo">
<include href="bar_firmware.xml" />
<include href="bar_modules.xml" />
...
<section name="gains1" />
<section name="gains2" />
<section name="moregains2" />
</airframe>
bar_firmware.xml
<firmware />
bar_modules.xml
<modules />
No error is output (if I change an XML filename to something
non-existant
I do get an error) but the firmware section doesn't get included:
Makefile:39: *** Architecture not set, maybe you forgot to add the
target?
Does anyone have any idea why this is, how I can avoid it, and tips for
organising multiple identical aircraft?
The actual file is here: https://github.com/blutack/**
paparazzi/blob/v3.9/conf/**airframes/UoM/Skywalker_Biker.**xml<https://github.com/blutack/paparazzi/blob/v3.9/conf/airframes/UoM/Skywalker_Biker.xml>
Cheers,
Gareth
______________________________**_________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/**mailman/listinfo/paparazzi-**devel<https://lists.nongnu.org/mailman/listinfo/paparazzi-devel>