-
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
[PPRZ Center] Add @AIRCRAFT placeholder constant. #1217
Conversation
I would prefer |
50af459
to
29065ef
Compare
I agree, I have amended the patch to reflect that. :) |
Coul we maybe also add an aircraft id? Since some programs use that (like natnet2ivy). |
Can you point me to an example session that uses natnet2ivy, so I can add it too? Why is natnet2ivy using the ID, most tools are using the aircraft name instead. Should it not be consistent with the rest of tools and use the name? |
I know I'm being annoying :), but we usually use AC_ID to point to the aircraft ID |
Because natnet2ivy is written in c and doesnt parse the xml files. Example session: |
@gautierhattenberger So we use @aircraft and @AC_ID? That is not very consistent euther... Unless we use @ac and @AC_ID. @fvantienen This is off topic of this pull request, but I think you should use a small xml parser still, and maybe create a library that implements getters for simple items. I am sure there will be more C programs in the future, so creating facilities for those is a very good idea. (libpprz.so) We use the name of the aircraft throughout the ground system to stay consistent, so we should stay in that habit I think. |
It is consistent in the way that we use |
I agree with @gautierhattenberger here... |
Raw Settings? the setup actuators is descriptive in the sense that this is the intended purpose at the moment. It should be superseded by a dedicated script that does not use settings for this but has an easier to use interface for that particular purpose. |
@esden could you plz change AIRCRAFT_ID to AC_ID as @gautierhattenberger suggested? |
When you use @aircraft as a constant parameter to a program in your session, it will be automatically replaced by the name selected in the A/C dropdown combo box of the Paparazzi Center. This makes it possible to create generic sessions that start programs which need to know which aircraft is of interest. For example settings. This is a possible solution to the paparazzi#1215 issue.
Refactored the placeholder magic constant code to make it bit prettier and easier to expand.
b0fc0cf
to
615f7f4
Compare
@flixr sorry, I was convinced that I already did fix the AC_ID part. None the less I have made all the suggested changes and pushed an updated patch set. |
[PPRZ Center] Add #AIRCRAFT# placeholder constant. When you use #AIRCRAFT# as a constant parameter to a program in your session, it will be automatically replaced by the name selected in the A/C dropdown combo box of the Paparazzi Center. This makes it possible to create generic sessions that start programs which need to know which aircraft is of interest. For example settings. The #AC_ID# is handled in the same way, but replaces it with the numeric aircraft id.
When you use @aircraft as a constant parameter to a program in your
session, it will be automatically replaced by the name selected in the
A/C dropdown combo box of the Paparazzi Center. This makes it possible
to create generic sessions that start programs which need to know which
aircraft is of interest. For example settings.
This is a possible solution to the #1215 issue.
[edit] Changed the comment here to reflect the final patch, decrease confusion.