ardupilot/Tools/ArdupilotMegaPlanner/bin/Release/aircraft/Rascal/Systems/main.nas

24 lines
472 B
Plaintext
Raw Normal View History

2011-12-09 17:51:09 -04:00
var dialog = gui.Dialog.new("/sim/gui/dialogs/rascal/config/dialog",
"Aircraft/Rascal/Dialogs/config.xml");
var last_time = 0.0;
var main_loop = func {
var time = getprop("/sim/time/elapsed-sec");
var dt = time - last_time;
last_time = time;
update_airdata( dt );
update_vars( dt );
2011-12-09 17:51:09 -04:00
update_ugear( dt );
settimer(main_loop, 0);
}
setlistener("/sim/signals/fdm-initialized",
func {
main_loop();
});