Erik Hofman writes: > > Melchior FRANZ wrote: > > Taking about show-stoppers ... > > > > * David Megginson -- Fri, 14 Mar 2003 13:46:07 -0500: > > > >>* Melchior FRANZ -- Friday 14 March 2003 19:08: > >> > >>>I'm now running fgfs on a computer that is almost 10 times as > fast as my > >>>previous one, and it looks like "repeatable" joystick button actions > >>>are now triggered with the tenfold frequency as well. Much too fast > >>>for my hat-controlled rudder. Should FGInput::update/_update_keyboard > >>>be throttled to a constant frequency depending on dt rather than on > >>>the cpu frequency? > >> > >>Yes, it should. At the time that I wrote the original input module, > >>we had no easy, standard way to do this, but now we do. I'll try to > >>get to it this week. > >> > >>Any suggestions on what the standard default repeat frequency should > >>be? > > > > > > Umm ... > > I've set it to 20 times a second. Could you test it for me?
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. This is fine but begins to constitute a fair amount of overhead and is not the way most asynchronous sytems work. FGFS has a fairly efficient global event queue mechanism already and we should probably be thinking about transfering *all* time dependent operations to use it instead. This is a bit more abstract method of doing these things but is common practice in real time systems and no more abstract then say the 'properties'. In fact the event queue implementation predates the 'properties' but was probably not fully appreciated when the practice of passing an explicit 'dt' was first adopted. I don't think we have reached the point where the explicit passing of 'dt' mechanism is causing a performance hit yet, but eventually it will as more and more components adopt the scheme. Note that with the event queue scheme an update function is not even called until it's time as arrived. Cheers Norman _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
