Howto:Reset/re-init Troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
→‎Nasal dialog: untested, fetch list of subsystems dynamically using the performance minitor
m (→‎Nasal dialog: untested, fetch list of subsystems dynamically using the performance minitor)
Line 463: Line 463:
# patched binaries (e.g. FGPythonSys) without requiring modifications to the vector below
# patched binaries (e.g. FGPythonSys) without requiring modifications to the vector below
# just some food for thought ... concept preserved at: http://wiki.flightgear.org/Howto_talk:Reset/re-init_Troubleshooting#Automatic_subsystem_list_retrieval
# just some food for thought ... concept preserved at: http://wiki.flightgear.org/Howto_talk:Reset/re-init_Troubleshooting#Automatic_subsystem_list_retrieval
var Tests = [
var Tests_old = [
     { name: "sound" },
     { name: "sound" },
     { name: "prop-interpolator" },
     { name: "prop-interpolator" },
Line 498: Line 498:
     { name: "view-manager" }
     { name: "view-manager" }
]; # vector with tests
]; # vector with tests
var Tests = [];
var performance_monitor = props.globals.getNode('/sim/performance-monitor');
var subsystemListTimer = maketimer(0.5, func(){
    gui.popupTip("Getting list of known subsystems from the performance monitor ...",1.5);
    foreach(var s; performance_monitor.getNode("subsystems").getChildren('subsystem') ) {
    var name = s.getNode('name').getValue();
    print("Subsystem found:", name);
    append(Tests, {name: name});
    }
print("subsystem list retrieved, disabling performance monitor again");
performance_monitor.getNode('enabled').setBoolValue(0); # disable the performance monitor again
   
   
debug.benchmark("button setup", func() {
debug.benchmark("button setup", func() {
Line 557: Line 572:
     call(canvas.Window.del, [], me);
     call(canvas.Window.del, [], me);
};
};
}); # end of initial/setup timer
performance_monitor.getNode('enabled').setBoolValue(1);
subsystemListTimer.singleShot = 1; # timer will only be run once
subsystemListTimer.start();


###################################################################
###################################################################

Navigation menu