nd-range.nas 408 B

123456789101112131415161718
  1. var wx_range=[5,10,25,50,100,150];
  2. var wx_index=3;
  3. setlistener("/sim/signals/fdm-initialized", func {
  4. setprop("instrumentation/nd/range",wx_range[wx_index]);
  5. # print("Flight Director ...Check");
  6. settimer(update_fd, 30);
  7. });
  8. var set_range = func(dir){
  9. wx_index+=dir;
  10. if(wx_index>5)wx_index=5;
  11. if(wx_index<0)wx_index=0;
  12. setprop("instrumentation/nd/range",wx_range[wx_index]);
  13. }