Re: [Flightgear-devel] Crash detection (was FDM freeze)

2005-05-26 Thread Andy Ross
Dave Culp wrote:
 One decision to make is what the handler should do once a crash is
 detected.  I have it calling the reinit code in order to reset the
 sim to the starting position (below), while others may prefer to
 have the sim close after a crash, or perhaps display a crash-splash
 screen and/or console warning.

YASim currently sets a /sim/crashed property.  Melchior's bo105 stuff
uses this as an animation input, but you could also write a Nasal
script or whatnot to poll for changes.

If you want to do push-mode handling with an FGCommand and make it
settable by the user, you can have the command call (or be) a Nasal
script that can be assigned by the user (e.g. globals.crashHandler =
myFunction).  Or have it indirect through another FGCommand binding
found in the property tree, etc...

Andy

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Crash detection (was FDM freeze)

2005-05-26 Thread Dave Culp
 If you want to do push-mode handling with an FGCommand and make it
 settable by the user, you can have the command call (or be) a Nasal
 script that can be assigned by the user (e.g. globals.crashHandler =
 myFunction).  Or have it indirect through another FGCommand binding
 found in the property tree, etc...


Which reminds me, I'm using the command old-reinit-dialog in my crash 
handler, but I can't find where this is defined.  It's not in FGCommand, so I 
assume it's a nasal script?  I'm not sure what node should be provided as the 
second parameter.  I'm using /sim/presets, is that what's expected?

I like the idea of a global crash handler script, but I don't know enough 
about nasal to write one.  How would it be called from within the code?


Dave

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d