Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flight plan modules #1540

Merged
merged 5 commits into from
Feb 27, 2016
Merged

Flight plan modules #1540

merged 5 commits into from
Feb 27, 2016

Conversation

gautierhattenberger
Copy link
Member

Yet another modules feature: load modules directly from a flight plan.

This should make easier to configure airframe so that they match the flight plans when they need specific modules.

@flixr
Copy link
Member

flixr commented Feb 17, 2016

Good idea!

But I wonder what happens (or even should be expected) if you have the module specified in your airframe file and in the flight plan?
Is it added twice? Only one of the two? Or merged in case one of them has extra define/configuration parameters?

@gautierhattenberger
Copy link
Member Author

@flixr I don't know yet, this is a draft to see what you guys think about this. I guess that the filtering on the flags and source files will just "merge" the two modules, but on the modules.h generation, maybe functions will appear twice. I should probably merge them before that when building the modules' list. I'll do that if it is worth the effort. @dewagter @fvantienen @OpenUAS you are using flight plans with various modules a lot I guess, what do you think about this ?
If the modules dependency system had been done already, I guess it would have been better to specify these dependency rather than loading them directly...

@gautierhattenberger
Copy link
Member Author

Merging modules is working now. Delft, do you have an opinion about this feature ?

@dewagter
Copy link
Member

@gautierhattenberger thank you for this feature: this is a great way to

  • cleanup airframe files
  • have less copies of airframe files
  • improve structure: what belongs where: nav_line is a flightplan feature

It also confirms one of the special aspects of paparazzi: flightplans are really full programs, and module includes make this more obvious.

@gautierhattenberger
Copy link
Member Author

@flixr can I merge or you prefer more test cases ?

@flixr
Copy link
Member

flixr commented Feb 25, 2016

So what is the merging behaviour now if you have the module added twice?
Does it merge the defines/configures? Does it print an info that it was merged?
What happens if you have the same define/configure option in each of them but with different value?

@gautierhattenberger
Copy link
Member Author

Now, defines/configure are aggregated (btw, I think I forgot to allow define/configure in flight plan...) but duplicates or incompatible parameters are not removed. "Real" duplicates will be merged at compile time by the sort function of the makefile. Incompatible will most likely produce compile errors (this can be improved later when people actually use the feature).
What is missing now is a debug print telling modules were merged. I will add that.

@flixr
Copy link
Member

flixr commented Feb 25, 2016

I still think that we should check for duplicate define/configure options (but not bother with the value) and throw an error (or at least a warning) in that case.
For configure options you will end up with one of the two, but you have no clue which one... for defines you might get a warning or compile error...

flixr added a commit that referenced this pull request Feb 27, 2016
Load modules directly from a flight plan.

Mainly meant for specifying which nav modules to load directly in the flight plan.
This should make easier to set up the airframe file as it doesn't need to contain the modules needed only for some specific flight plans (where some nav routines are called that are provided by nav modules).
@flixr flixr merged commit 390597e into master Feb 27, 2016
@flixr flixr deleted the flight_plan_modules branch February 27, 2016 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants