Norman Vine writes:

 > This should work fine, the only thing I am worried about is that it
 > seems as if every sub component of FGFS is passing a double dt in
 > both the initialization and the update function.  Then locally
 > storing a double elapsed variable to compare against.

There might be some legacy code that does that, but nothing recent
should.  The subsystem manager automatically takes care of minimum
time slices: for example, if you want to make sure that a subsystem is
never updated more than 5 times per second, you would just do this:

  globals->add_subsystem("my-subsystem", 
                         new MySubsystem,
                         FGSubsystemMgr::GENERAL,
                         0.2);

The subsystem manager automatically takes care of the timeslice, and
will not invoke the subsystem's update method until at least 0.2
seconds has elapsed.



All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to