Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Howto talk:Reset/re-init Troubleshooting

From FlightGear wiki
Jump to: navigation, search

Features to integrate

  • loading/switching aircraft
  • repositioning
  • performance monitor stats via /sim/performance-monitor/enabled
  • saving/loading flight recorder tapes
  • introduce a tabbed interface
  • add support for Nasal tracking (modules, listeners, timers, callbacks, GC stuff)
  • integrate with the sigar stuff we have
  • add more Draw masks
  • show frame rate/spacing in statusbar
  • add tooltips
  • extend subsystemFactory to support other subsystems (events, nasal)
  • review optimizing Canvas for better instancing support at the Group/StateSet level for repeated widgets (think all those buttons/labels) ?
  • add useful buttons: pause/unpause (freeze), time control (speedup)

subsystemFactory.cxx

  • integrate with suspend/resume fgcommands [1]
  • add new fgcommand for writing a ist of known subsystems to a configurable property tree (i.e. so that we don't need to hard-coded supported subsystems)
  • add new fgcommand/API for registering new subsystems with the factory by using a std::map<std::string, SGSubsystem*>

Automatic subsystem list retrieval

Note conceptually this should work, but it is untested code - just preserving the idea here for now. Besides, there is the obvious issue of this no longer working properly once the dialog has been used to remove subsystem, i.e. when the dialog is closed and re-opened ?

var known_subsystems = [];

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(known_subsystems, {name: name});
    }
print("subsystem list retrieved, disabling performance monitor again"); 
performance_monitor.getNode('enabled').setBoolValue(0); # disable the performance monitor again
});

performance_monitor.getNode('enabled').setBoolValue(1); 
subsystemListTimer.singleShot = 1; # timer will only be run once
subsystemListTimer.start();

Development

it would make sense to turn this into a dedicated dialog for $FG_ROOT/Nasal/canvas/gui/dialogs, which it basically is already - i.e. the file could be moved there "as is".