paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] <include> directive in airframe files


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] <include> directive in airframe files
Date: Mon, 2 Jul 2012 09:11:38 +0200

I struggled with this too some time ago. My conclusion was: with the current custom compile tools you can only put defines in subfiles and no modules and firmware. For us that meant, exactly the things you don't want: e.g. we want a common firmware and set of modules and specific airframe name and gains.

But as Felix said: there are several issues that arise when splitting files so these should probably be solved first before it really becomes interesting. In the mean time a difftool is a handy help...

-Christophe 



On Sun, Jul 1, 2012 at 3:27 PM, Gareth Roberts <address@hidden> wrote:
Hi Felix,

Still doesn't work unfortunately with the <airframe> in the root.
It works as long as the firmware is present in the main file; looks like it won't include <firmware> sections.

I understand about the settings tool but it shouldn't be a problem; the whole point of trying this is so that stuff I would change from the settings tool would already be in the airframe specific xml (Skywalker-One.xml or whatever).  The stuff I don't change when flying (LED settings or whatever) could then live in a single xml shared between Skywalker-One, Skywalker-Two etc.

I would like to have an 'autopilot.xml' or something similar which contains the AP specific stuff, like the current <firmware> plus the IMU stuff, modules & <command-*>.

The airframe.xml file would then purely contain the aircraft gains, servos, battery etc - stuff related to the airframe!

It would seem a more logical layout, although some sections would need splitting - IMU body rotations from the rest of the IMU parameters for example.

I originally thought of this when the discussion about an aircraft creation wizard was going on.  Currently, there is a strong coupling between the physical aircraft and chosen autopilot in the configuration which makes automatically generating aircraft configurations (airframe, radio, settings etc) more complex than it could be.

Splitting would also simplify aircraft sharing - if I wanted to send you Bixler gains, you could use my Bixler.xml with your Lisa_M_Flixr.xml or whatever.

Cheers,
Gareth


On Fri, 29 Jun 2012 23:32:59 +0100, Felix Ruess <address@hidden> wrote:

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@hiddenmanchester.ac.uk> wrote:

Hi all,

I recently noticed the <include href="" /> 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="" />
       <include href="" />
       ...
       <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>

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]