efb_page.nas 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # ==============================================================================
  2. # Original Boeing 747-400 pfd by Gijs de Rooy
  3. # Modified for 737-800 by Michael Soitanen
  4. # Modified for EC145 by litzi
  5. # ==============================================================================
  6. setprop("instrumentation/efis/efb/page",0);
  7. adc["efbpage"] = Sensor.new({prop: "instrumentation/efis/efb/page" });
  8. page_setup["efb"] = func (i) {
  9. p = mfd[i].add_page("efb", HELIONIXPATH~"svg/efb.svg");
  10. # MFD top row button labels
  11. # ============================
  12. p.add_cond("fndBtn", {offset: isin("fnd", mfd[i].pages) > -1 } );
  13. p.add_cond("vmdBtn", {offset: isin("vmd", mfd[i].pages) > -1 } );
  14. p.add_cond("navdBtn", {offset: isin("navd", mfd[i].pages) > -1 } );
  15. p.add_cond("dmapBtn", {offset: isin("dmap", mfd[i].pages) > -1 } );
  16. p.add_cond("miscBtn", {offset: isin("misc", mfd[i].pages) > -1 } );
  17. p.add_cond("efbBtn", {offset: 0} );
  18. # EFB pages
  19. # ============================
  20. var maxpg=5;
  21. #hide all pages except TOC (page number =0)
  22. for (var page=1; page<=maxpg; page=page+1)
  23. p.add_cond("pg"~page, {offset: 0});
  24. #callbacks for page update
  25. for (var page=0; page<=maxpg; page=page+1)
  26. p.add_cond("pg"~page, {sensor: adc.efbpage, equals: page});
  27. p.add_cond("pageBtn", {sensor: adc.efbpage, notequal: 0});
  28. p.add_text("pageNo", {sensor: adc.efbpage, format: "PAGE %d/99" });
  29. }; # func