main.nas 449 Bytes
Newer Older
lm's avatar
lm committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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_ugear( dt );

    settimer(main_loop, 0);
}


setlistener("/sim/signals/fdm-initialized",
	    func {
		main_loop();
	    });