From: Dunlap, R. <ran...@in...> - 2000-07-20 16:49:36
|
> From: Franz Sirl [mailto:Fra...@la...] > > At 08:30 20.07.00, Alexander Perry wrote: > >If someone jiggles the USB cables while a USB > >joystick is in active use, the stack may detect > >this as the device being dropped and reattached. Sounds like a cable/device problem to me. > >In this case, we have no idea whether it is the > >same device, so we naturally take the next free > >device number. That's fine by me; I see it happen. Is the device disconnected and dropped, or just dropped without being disconnected (as far as the USB stack knows)? If the USB stack does a disconnect for the device and then another connect happens, the connected device will be assigned the same device number. Or is this happening too quickly for that to happen? > >Unfortunately, the FD that is reading the existing > >device number doesn't generate any errors, and simply > >keeps repeating the old data back indefinitely. > >The application has no reason to suspect anything > >has gone wrong, and cheerfully lets the game > >continue running with frozen user controls. > > > >If an error would be returned, at least the application > >might be able to act (even if only to abort the game > >in progress). In the case of FlightGear, I was planning > >to have it search for new joysticks so that it can find > >the new device number and continue to accept input data. > >There might be a fraction of a second glitch in the > >control response while this occurs, but that would be > >much less irritating that the existing behavior. > > > >Is the lack of an error a consequence of a spec that > >we're obeying, or can it easily be changed please ? > I noticed that too, and there was a short discussion recently on the > linuxconsole-dev list about that. So linux-console discusses USB also? Man, I have too much email already. :( ~Randy |