moshegood Posted August 29, 2003 Report Posted August 29, 2003 i want to switch to slew mode and let the joystick continue working there. i know that this has been enabled since version 2.94, but i can't figure out how to do it. Is it a different offset? If so, what? Do i write a different value?
Pete Dowson Posted August 29, 2003 Report Posted August 29, 2003 i want to switch to slew mode and let the joystick continue working there. i know that this has been enabled since version 2.94, but i can't figure out how to do it. Is it a different offset? If so, what? Do i write a different value? In FS2002 it was discovered that writing to the Slew control offset (05DC) to enable slew mode did NOT switch to the slew mode joystick axes. The only way to do that was for FSUIPC to intercept the writing of Non-Zero to 05DC and instead send FS a SLEW ON command. It was decided that, since the FS offset had always omitted to switch the axes, rather than make this standard I would enable it by using the extension in 05DE. This is, I think, what you are referring to as "enabled" but you seem to have it the wrong way around -- before that change the normal joystick axes were always left enabled, you couldn't make FS swap over to the slew axes via the IPX interface. Unfortunately, in FS2004, which I assume is now what you are asking about (though you don't say), there is no place which FS is recognising as a "slew on/off" switch -- there is in effect no 05DC nor 05DE facility actually provided in FS2004. To support any Slew control and indicator at all, FSUIPC has to intercept writes to 05DC and operate the FS Slew control as a result. Similarly it reads the slew state and provides the value back as an indicator. But now that it has no choice, now that the only way to enable Slew mode is via the FS control, there's no use for 05DE. The joystick axes are always switched to the SLEW ones when in slew mode. I see no way around that. There should be no problem for you if you are using normal axes, assigned in FS. If you are using separate controls like PFC or, presumably, Elite, it might be a problem as they don't send any axis values to the Slew controls. Regards, Pete
moshegood Posted August 29, 2003 Author Report Posted August 29, 2003 I am using FS2002. i want it to switch the joystick axes to the slew mode ones. what do you mean by: "enable it by using the extension in 05DE."? if i want to switch to slew mode and switch to slew axes what values would i write to which offsets and in which order? and when i want to switch off slew mode and switch back to regular axes what would i do? Thanx a ton
Pete Dowson Posted August 29, 2003 Report Posted August 29, 2003 I am using FS2002. i want it to switch the joystick axes to the slew mode ones. what do you mean by: "enable it by using the extension in 05DE."? Sorry, isn't it described in the SDK yet? If not, my mistake. I'm referring to my own copy, of course, which I keep updated. Here's the entry as it should be appearing: 05DE 2 bytes Slew control: write non-zero value here at same time as changing 05DC above, and the Slew mode change includes the swapping of the assigned joystick axes. [ignored in FS2004 – the axes are swapped in any case] Regards, Pete
moshegood Posted August 29, 2003 Author Report Posted August 29, 2003 Well, i can't seem to get it to work. Here's my code in C: _declspec(dllexport) void writeSlew(short *src, long *result){ short one = 1; FSUIPC_Write(0x05de,2,&one,result); FSUIPC_Write(0x05dc,2,src,result); FSUIPC_Process(result); } The axes just aren't switching. Any clue? Moshe
Pete Dowson Posted August 29, 2003 Report Posted August 29, 2003 The axes just aren't switching. I don't know what your "src" is, but you need to now treat 05DC as a 4 byte value, and write 0x00010001 to set slew, 0x00000000 to unset it. It MIGHT work with your code if you actually set 05DC before 05DE, bt I think not -- safest to do it as a single value. Pete
moshegood Posted August 29, 2003 Author Report Posted August 29, 2003 Well, I've just tested it and it works. It doesn't work even if u write 0x05dc first. I had to write 0x00010000 to get the axes back to normal, not 0. thanks a ton for all the help. Moshe
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