vir32.nas 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #### VIR-32 NAV reciever ####
  2. var VIR = props.globals.getNode("/instrumentation/VIR-32",1);
  3. var VR1_STBY = VIR.getNode("standby1",1);
  4. var VR2_STBY = VIR.getNode("standby2",1);
  5. var VR1_NAV = VIR.getNode("nav1",1);
  6. var VR2_NAV = VIR.getNode("nav2",1);
  7. var STBY1=props.globals.getNode("/instrumentation/nav/frequencies/standby-mhz");
  8. var STBY2=props.globals.getNode("/instrumentation/nav[1]/frequencies/standby-mhz");
  9. var NAV1=props.globals.getNode("/instrumentation/nav/frequencies/selected-mhz");
  10. var NAV2=props.globals.getNode("/instrumentation/nav[1]/frequencies/selected-mhz");
  11. setlistener("/sim/signals/fdm-initialized", func {
  12. VR1_STBY.setValue(getprop("/instrumentation/nav/frequencies/standby-mhz")*100);
  13. VR2_STBY.setValue(getprop("/instrumentation/nav[1]/frequencies/standby-mhz")*100);
  14. VR1_NAV.setValue(getprop("/instrumentation/nav/frequencies/selected-mhz")*100);
  15. VR2_NAV.setValue(getprop("/instrumentation/nav[1]/frequencies/selected-mhz")*100);
  16. print("VIR-32 ... OK");
  17. });
  18. setlistener("/instrumentation/VIR-32/standby1", func(sb1){
  19. STBY1.setValue(sb1.getValue() * 0.01);
  20. },0,0);
  21. setlistener("/instrumentation/VIR-32/standby2", func(sb2){
  22. STBY2.setValue(sb2.getValue() * 0.01);
  23. },0,0);
  24. setlistener("/instrumentation/VIR-32/nav1", func(nm1){
  25. NAV1.setValue(nm1.getValue() * 0.01);
  26. },0,0);
  27. setlistener("/instrumentation/VIR-32/nav2", func(nm2){
  28. NAV2.setValue(nm2.getValue() * 0.01);
  29. },0,0);