Skip to content

Create a macro extension to help the FIP page definitions #114

@norberttak

Description

@norberttak

A macro needed to help the page definition on FIP devices

  1. Macros shall be placed in the plugin folder (resources/plugins/xpanel/64) in a subfolder name macros
  2. Macros shall have the name.macro file name structure
  3. A single line macro can be used as @macro_name(parameter1,parameter2,...) Where parameters can be
    dataref, constant or lua_function

The syntax of a macro file:

[macro_info]
name=garmin_g5
description=Garmin G5 Electronic Flight Instrument created for General Aviation
device=fip ;flight information panel
version=1.0

[page:id="HSI"]
  [layer:image="fip-images/HSIb_card_hdg.bmp,ref_x:90,ref_y:90,base_rot:0"]
  rotation=@{hsi_course}
  offset_x="const:200"
  offset_y="const:120"

  [layer:image="fip-images/HSIb_pointer_crs_tf.bmp,ref_x:70,ref_y:71,base_rot:0"]
  rotation=@{hsi_course_rotation}
  offset_x="const:200"
  offset_y="const:120"

  [layer:image="fip-images/HSIb_mask_front.bmp,ref_x:120,ref_y:120,base_rot:0"]
  rotation="const:0"
  offset_x="const:200"
  offset_y="const:120"

  [layer:type="text"]
  offset_x="const:3"
  offset_y="const:218"
  text="const:QNH"

  [layer:type="text"]
  offset_x="const:38"
  offset_y="const:218"
  text=@{current_baro_hpa}
  1. The macros can be loaded from airplane configuration with the @use macro_name
  2. To use a macro defined page:
[device:id="saitek_fip_screen"]
serial="MZB05779E2"
[screen:id="fip-screen"]
@use garmin_g5

[@page:id="HSI"]
@parameter="name: hsi_course, value:dataref:B742/HSI/DG_course_deg[0],scale:-1.0"
@parameter="name: hsi_course_rotation, value:lua:hsi_course_rotation()"
@parameter="name: current_baro_hpa, value: lua:get_current_baro_hpa()"

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions