enav.nas 824 B

12345678910111213141516171819202122232425262728293031
  1. # ==============
  2. # TACAN Label
  3. # ==============
  4. tacanLabel = func {
  5. namestring = getprop("instrumentation/tacan/name");
  6. if (namestring !=nil) {
  7. for(i=1; i <= 15 ; i = i+1) {
  8. if(i <= size(namestring)) {
  9. if ( i < 10 ) {
  10. setprop("instrumentation/tacan/idchars/char_"~chr(i+48),namestring[i-1]);
  11. }
  12. else {
  13. setprop("instrumentation/tacan/idchars/char_1"~chr(i+38),namestring[i-1]);
  14. }
  15. }
  16. else {
  17. if ( i < 10 ) {
  18. setprop("instrumentation/tacan/idchars/char_"~chr(i+48),'\ ');
  19. }
  20. else {
  21. setprop("instrumentation/tacan/idchars/char_1"~chr(i+38),'\ ');
  22. }
  23. }
  24. }
  25. }
  26. settimer(tacanLabel, 5.0);
  27. }
  28. settimer(tacanLabel, 1.0);