-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[settings] add optional target attribute to settings #1157
Conversation
@@ -1,6 +1,6 @@ | |||
<!DOCTYPE settings SYSTEM "../settings.dtd"> | |||
|
|||
<settings> | |||
<settings target="ap|nps"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why restrict this to ap and nps?
That means you can't use it with demo and test targets...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it fails with sim target where imu.c is not compiled. If you want to keep it without a specific target, I suggest to fix sim then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, how about something like flixr@493fde0 to add the possibility to exclude a list of targets with target="!foo|bar"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try
is incomplete, String.get may return Invalid_argument
do we merge this one ? |
It is ok to merge for me. |
Should we merge this befoer v5.6 regardless of the missing checks if you had unloaded settings/modules? |
It is very useful but sadly it is not possible to make just one line insensitive in the settings selection box. At least we could add a warning when unloading settings ? |
I wanted to make the line unsensitive, but it doesn't seems to be possible. Either all the lines or nothing. As a fallback, the settings is unselected. It is not perfect (some stuff might be missed, you can check it back, ...) and the settings are removed at generation time anyway. Not sure it can be done better unless someone finds the way to control the list element sensitivity one by one.
I'm not so much concerned about the selection box, that seems to "only" be an inconvenience to me. What about adding another MD5sum for only the settings and sending that with ALIVE? |
Or better, also do the filtering for used settings (unloaded modules with settings, targets in settings) when creating I think that would be the best solution, or am I missing something obvious here? |
It seems that we are currently only removing the settings that are not selected in the pprz center. I guess it should also work if we correctly unload them when the module is not valid for the target. |
Yes and the settings that are directly added but don't match the target, could you do that in this branch? |
this should prevent mismatch when settings are unloaded due to unsupported targets
The filtering now only works correctly from within paparazi center if you don't enable unloaded setting again. |
I don't get it. If I force the selection of an unwanted settings file (like nps.xml for ap target), it will be removed from conf_aircraft.xml and will not appear in the generated settings as well. |
Ok, nevermind my previous comment.... that indeed works as expected now. However I think it would be better to not "uncheck" the setttings file in the paparazzi center if it is unloaded. |
settings are still unloaded by gen_aircraft
Actually I think the unloaded should not change the conf_aircraft.xml (and hence the md5sum) unless they have settings. |
Nevermind, seems to work as expected. |
[settings] add optional target attribute to settings f not target attribute is given, the settings are added for all targets like before. This makes it easier to add settings files to the conf that are only valid for some targets like nps or some that you don't want when using the test progs. Beware of: if you compile a target that unloads some settings or modules (e.g. the sim) after you uploaded to the ap, the var/aircrafts/<ac>/settings.xml file that has all usable settings combined will change. Now the calculation of the MD5sum is taking unloaded settings into account, meaning it will change and warn the user if the last compiled target has different settings.
Hi, I'm just getting back into paparazzi. I tried to follow the mac On Thu, Jul 30, 2015 at 5:05 AM, Felix Ruess notifications@github.com
|
@flightenabledOrg please use the mailing list for such questions and not some totally unrelated issue... |
Whoops, I apologize. @flightenabledOrg https://github.com/flightenabledOrg please use the — |
If not target attribute is given, the settings are added for all targets like before.
This makes it easier to add settings files to the conf that are only valid for some targets like nps or some that you don't want when using the test progs.
Beware of: if you compile a target that unloads some settings or modules (e.g. the sim) after you uploaded to the ap, the
var/aircrafts/<ac>/settings.xml
file that has all usable settings combined will change ~~~and the hence the wrong ones used in GCS and settings prog~~~.Now the calculation of the MD5sum is taking unloaded settings into account, meaning it will change and warn the user if the last compiled target has different settings.