Macro extension to help the fip page definitions - #121
Draft
norberttak wants to merge 4 commits into
Draft
Conversation
Add a macro-expansion pre-pass to ConfigParser so a reusable .macro file can
describe a FIP instrument once with @{name} placeholders, and an aircraft config
binds those to datarefs/lua/constants via @use + [@page]/@parameter blocks.
After substitution the macro's pages are ordinary [page]/[layer] sections that
flow through the existing FIP handlers unchanged. The IniFileParser lexer now
accepts '@' in identifiers so the @use/@parameter/@page tokens parse; macro image
assets resolve against <plugin>/macros via a synthetic macro_base_dir property
(kept out of the tokenized image string so a Windows drive-letter colon can't be
mistaken for a separator). find_config_file now seeds plugin_path/aircraft_path on
the throwaway config so macro-using configs parse during aircraft matching.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Norbert Takacs <norberttak@gmail.com>
test_fip_macro covers expanding a macro into pages/layers (a successful parse also
proves macro-folder bmp resolution) and the negative case where an unbound @{name}
parameter fails the parse. Registered in the CMake/ctest build and the Windows
test project.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Norbert Takacs <norberttak@gmail.com>
…lder Add macros/garmin_g5.macro (a Garmin G5 style HSI page) with its bmp assets, and an install rule that deploys the macros/ folder next to the plugin so it resolves at runtime under <plugin>/macros. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Norbert Takacs <norberttak@gmail.com>
Add a FIP macros section to doc/documentation.md covering the .macro file format, the @use/[@page]/@parameter binding syntax, @{name} placeholders, and macro-folder asset resolution. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Norbert Takacs <norberttak@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.