Re: [Flightgear-devel] saving aircraft specific data (Hobbs meter etc.)
Hi Melchior, Melchior FRANZ wrote: I've now added a mechanism that saves aircraft specific data. For example, for the bo105 into ~/.fgfs/aircraft-data/bo105.xml (Unix) or %APPDATA%\flightgear.org\aircraft-data\bo105.xml (MS). Apparently this disables the: --prop:/sim/startup/save-on-exit=false command line flag. Here the bo105 _always_ creates the respective ~/.fgfs/aircraft-data/~/.fgfs/aircraft-data/bo105.xml directory plus file, even though I'd certainly like to disable this habit. Where do we now find the switch to disable this - in my personal view very annoying - feature ? I didn't find the respective hook to recover the old behaviour, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] saving aircraft specific data (Hobbs meter etc.)
I have now also implemented a timer class that saves the accumulated time to the aircraft data file in ~/.fgfs/aircraft-data/ and restores that next time (can be turned off). Syntax: aircraft.timer.new(property, [resolution:double [, save:bool]]); property ... property path or props.Node hash where timer value should be maintained resolution ... timer update interval (not accuracy, which is always at maximum); (default: 1 s) For most Hobbs meters 60 s or even more should be good enough. save ... whether the value should be saved to the aircraft data file; (default: true, as this is probably the main use for the class) Methods: start() stop() reset() Examples: var turbine_timer = aircraft.timer.new(/sim/time/hobbs/turbine, 60); turbine_timer.start(); ... turbine_timer.stop(); aircraft.timer.new(/sim/time/hobbs/foo).start(); # anonymous timer m. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel