Skip to content

Macro extension to help the fip page definitions - #121

Draft
norberttak wants to merge 4 commits into
masterfrom
114-create-a-macro-extension-to-help-the-fip-page-definitions
Draft

Macro extension to help the fip page definitions#121
norberttak wants to merge 4 commits into
masterfrom
114-create-a-macro-extension-to-help-the-fip-page-definitions

Conversation

@norberttak

Copy link
Copy Markdown
Owner

No description provided.

norberttak and others added 4 commits August 10, 2026 17:56
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>
@norberttak norberttak added this to the v1.11 milestone Aug 10, 2026
@norberttak norberttak self-assigned this Aug 10, 2026
@norberttak norberttak added the enhancement New feature or request label Aug 10, 2026
@norberttak norberttak linked an issue Aug 10, 2026 that may be closed by this pull request
@norberttak
norberttak marked this pull request as draft August 10, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a macro extension to help the FIP page definitions

1 participant