dmesw.nas 770 B

123456789101112131415161718
  1. setprop("instrumentation/steer-mode",0);
  2. var dme_step = func(stp){
  3. var swtch= getprop("instrumentation/steer-mode");
  4. swtch += stp;
  5. if(swtch >3)swtch=3;
  6. if(swtch ==2)swtch=2;
  7. if(swtch ==1)swtch=1;
  8. if(swtch <0)swtch=0;
  9. setprop("instrumentation/steer-mode",swtch);
  10. if(swtch==0){setprop("instrumentation/dme/frequencies/source","instrumentation/tacan/frequencies/selected-mhz")};
  11. if(swtch==1){setprop("instrumentation/dme/frequencies/source","instrumentation/nav[0]/frequencies/selected-mhz")};
  12. if(swtch==2){setprop("instrumentation/dme/frequencies/source","instrumentation/tacan/frequencies/selected-mhz")};
  13. if(swtch==3){setprop("instrumentation/dme/frequencies/source","instrumentation/nav[0]/frequencies/selected-mhz")};
  14. }