unpung Posted August 7, 2006 Report Posted August 7, 2006 Hi, I made my own joystick with hat switch (USB HID device). The HAT switch has a 360 positions. I'm trying to assign this HAT switch for heading angle (0 to 359 degrees) in FS9 by add this line on fs9.cfg POV_MOVE_EVENT_00=HEADING_BUG_SET But it didn't work, the heading always reset to 360 when I turn the HAT switch. Is it possible to assign the absolute value from the joystick to FS? Could anyone tell me how to do this? thanks.
Pete Dowson Posted August 7, 2006 Report Posted August 7, 2006 I'm trying to assign this HAT switch for heading angle (0 to 359 degrees) in FS9 by add this line on fs9.cfg POV_MOVE_EVENT_00=HEADING_BUG_SET But it didn't work, the heading always reset to 360 when I turn the HAT switch. Is it possible to assign the absolute value from the joystick to FS? I've really no idea how FS POV assignments work at all. Sorry. Does FSUIPC logging show what's happening at all? For a normal Hat there's usually an "off" event which usually does something like restore the forward view. Could your device be sending something like that -- a -1 or 0 when you release it? If so, that could certainly do what you observe. Does it actually change the heading before you release it and it goes to 360? Oh, one other thing. I think there can be two different hat resolutions, one which goes 0 to 360 and another which uses units which go to to 36000 (i.e. in 1/100ths). I'm writing from memory here so it may not be quite like that, but I do recall something like that. Possibly, if your device is configured (in the HID driver?) to give the wrong one the values would be out of range in any case? Regards, Pete
unpung Posted August 8, 2006 Author Report Posted August 8, 2006 Hi Pete, Thank you for your reply, For your question, my device didn't send any value when I released it. It always send the current position that stored in my hardware internal memory. As you said, the HID report might give some value that out of range. So I tried to change the range from 0 to 35999, it didn't work. I also tried the value from 0 to 65536 (as suggested in Pelle's FS-Interrogate) and again didn't work. I was sure that the HAT switch work as a common game controller since it showed the correct position when I looked in the Windows' Game Controller property. I think what happen is FS didn't get the RAW value from my joystick, it might translate the absolute value into something else. Is it possible that FS doesn't support the RAW value from POV? (it support only RAW value from Axis controls) I've read your helpful document on FS controller and you suggested that POV can be used to set HEADING_BUG_SET by setting Axis 6. Have you tried that on any joystick before? Thank you again, Ake.
Pete Dowson Posted August 8, 2006 Report Posted August 8, 2006 I think what happen is FS didn't get the RAW value from my joystick, it might translate the absolute value into something else. Is it possible that FS doesn't support the RAW value from POV? (it support only RAW value from Axis controls) I thought it was the reverse. It most certainly doesn't use RAW values for axes. But for POVs it must do, surely. I'm sorry, but I really don't understand what is going on. I've read your helpful document on FS controller and you suggested that POV can be used to set HEADING_BUG_SET by setting Axis 6. Have you tried that on any joystick before? Not since FS98/2000 days when I used EPIC. That's where that text comes from. Sorry. I think in those days there was no "POV_MOVE_EVENT" entry. But also, in those days, FS was using the standard joystick API in windows, and values went through more or less unmolested. Since they changed to DirectInput in FS2002 I'm afraid I lost interest somewhat and I don't really know what happens -- except that DirectInput seems to mess with values. I still use the original Joy API in FSUIPC, and have the facility to read axes in RAW form in the Axes assignments section. But currently there's no POV support there. I suppose that is something I could add -- reading RAW POV values like an axis. It is possible, but not just at present as it isn't a trivial job (lots of table changes to accommodate another axis type after XYZRUV), and I don't have the time to spare at present. If you still haven't solved it by November, say, get back to me and I'll see what I can do. For now I'm afraid it's a case of continued experimentation and debugging to find out what is going on. Sorry. Regards Pete
unpung Posted August 8, 2006 Author Report Posted August 8, 2006 That's all right, Pete. I know it a time consuming task to get FSUIPC to support this new control. I'll continue trying and will let you know what happen next. If I get something useful, I'd like to share it with you. Thanks, Ake.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now