Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

I try to detect in one of my application the Joystick ON/OFF state.

Sending the JOYSTICK_CALIBRATE control () via FSUIPC at offset H3110 correctly switches the Joystick from ON to OFF or OFF to ON but I didn't succeed in determining what was the Joystick state before performing this action. (my aim is to reconnect the JS if the user inadvertently disconnected it, not the inverse of course).

I also used (in other parts of the program) the specific enabling/disabling facilities you provided through offset H310A but this is, I think, another facility not related to the main "physical" joystick state as set by the "Joystick on/off" key event.

Thanks for your help

Hervé

Posted
Sending the JOYSTICK_CALIBRATE control () via FSUIPC at offset H3110 correctly switches the Joystick from ON to OFF or OFF to ON

Is that what that does? Strange name for it! :-). How do you specify which joystick? Or is that any and all joystick axes and button connections?

but I didn't succeed in determining what was the Joystick state before performing this action. (my aim is to reconnect the JS if the user inadvertently disconnected it, not the inverse of course).

HmmmI really have no idea how to tell if the FS option for enabling/disabling joysticks is on or off. Sorry.

If you ever find out, let me know and I'll add a flag somewhere for it.

I also used (in other parts of the program) the specific enabling/disabling facilities you provided through offset H310A but this is, I think, another facility not related to the main "physical" joystick state as set by the "Joystick on/off" key event.

Correct. FSUIPC's facilities for axes are all concerned with the FS axis controls. It has no idea how these arise, whether from program or real joystick is immaterial.

Regards,

Pete

Posted
Is that what that does? Strange name for it! :-). How do you specify which joystick? Or is that any and all joystick axes and button connections?

Yes..I agree the name is inappropriate. But I didn't discovered that. You mentioned it as a possibility somewhere..I tried and it works as a ON/OFF command. Since I only have one joystick I cannot answer the second part ; may be the second at H3114 has something to do with that ; in my case writing 0 or 1 here didn't change the result. I confirm all axes AND buttons are either enabled or disabled

If you ever find out, let me know and I'll add a flag somewhere for it.

Nothing with FSInterrogate. If you have a range of values to look at, I know how to do that :)

Regards,

Hervé

Posted

I agree the name is inappropriate. But I didn't discovered that. You mentioned it as a possibility somewhere..I tried and it works as a ON/OFF command. Since I only have one joystick I cannot answer the second part ; may be the second at H3114 has something to do with that

No, after reading the rest of your message I realised that it was, indeed, the same as the "enable/disable" entry in the Options menu someplace, and also isn't it assigned by default to the 'K' key?

Nothing with FSInterrogate. If you have a range of values to look at, I know how to do that :)

No. I imagine it would mean disassembling more of Controls.DLL and tracing through. Almost nothing new is likely to be discovered using the offsets FSUIPC maps -- more and more of FS data disappears into private Class data with each release.

Regards,

Pete

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.