From: Bj|rn A. <d3a...@dt...> - 2002-01-16 16:39:06
|
Quoting Johann Deneux <jo...@Do...>: > [cc to the linuxconsole list] > (Bj|rn is currently working on support for force feedback for microsoft > joysticks, and sent a patch to the usb-devel ML concerning the debugging > system of the hid driver) > > On Wed, 16 Jan 2002, Bj|rn Augustsson wrote: > > > Nope, 1.8 is what I've got here. > > > > I'll certainly look into that. Thanks for the heads up! > > > > I have quite a lot more written, but there's still some bugs and stuff > > that I haven't implemented yet, so I split this part out. > > How far have you got ? Have you managed to make your joystick move yet ? > Please also have a look at the input/event API. It would be nice if it was > the one used to download effects to the device. No, I haven't, but I'm close. (I think!) OK, longish status update time: I am using the event API. The joystick now reports almost all of it's features to the event stuff, but actually writing stuff to the it doesn't work yet. I haven't started on uploading effects, but I thought I had the "set device gain" thing working last night, but I ran into problems where this happens: Jan 16 03:49:06 localhost kernel: Setting device gain to 127, span = 255 Jan 16 03:49:06 localhost kernel: hid-debug: input PhysicalInterfaceDevice.Device_Gain = 127 Jan 16 03:49:06 localhost kernel: hid-core.c: ctrl urb status -32 received -32 is EPIPE, and I'll have to look into why that happens a bit later today. The joystick actually seems to be a proper PID device, so that's what I'm aiming for, and trying not to hard-code anything MS-FF2-specific in there. There's a few policy type things to consider. There's an Usage called PhysicalInterfaceDevice.Safety_Switch, which is a switch that notices if you hold the joystick or not (and if you let go, it turns the forces off). Since the existing HID-input "parser" reports every one-bit input usage as a button, this gets reported that way (except it's inverted, if you let go of the stick, it goes 0 -> 1). It's not really a button, but it could be useful to a game anyway. You could bind pause to it for example, or something. Do I report it to the API as a button, or do I add a new bit about this somewhere? Also, HID devices (can) have physical units bound to them, as in "This axis measues rotation, +- 30 degrees, 8bit resolution." There is no way for an app to get this information thru the input API, and it should probably be added at some point. It's not critical for game controllers, but other apps might want that information. (But as I said, I'll have to look at the current hid code, as I've been working against what's in 2.4.18pre3. Maybe things have changed.) /August. -- Wrong on most accounts. const Foo *foo; and Foo const *foo; mean the same: foo being a pointer to const Foo. const Foo const *foo; would mean the same but is illegal (double const). You are confusing this with Foo * const foo; and const Foo * const foo; respectively. -David Kastrup, comp.os.linux.development.system |