casdisable (1).nas 657 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #disable cas when engines running- otherwise we are overflooded with error messages in the console
  2. call_casdisable = func {
  3. if ( getprop("/rotors/main/rpm")> 80.0)
  4. {
  5. setprop("/controls/flight/fcs/cas-enabled", 0);
  6. } else {
  7. setprop("/controls/flight/fcs/cas-enabled", 1.0);
  8. }
  9. #if (RUN2 ==1) {
  10. # setprop("/controls/flight/fcs/cas-enabled", 0);
  11. # } else {
  12. # setprop("/controls/flight/fcs/cas-enabled", 1.0);
  13. # }
  14. settimer(call_casdisable, 0.2);
  15. }
  16. init = func {
  17. settimer(call_casdisable, 0.0);
  18. }
  19. init();