Jump to content
The simFlight Network Forums

disabling the joystick


Recommended Posts

Hi Pete,

Is there a way to disable the joystick using an outside program via FSUIPC? I'd like to disable it while my program moves the plane about in slew mode. I didn't find an offset for this using FS Interrogate's 3-Scan Locator. I found offset 310B, which appears to do at least what I want to do, but I've only been able to get the least significant three bits (fwd/backward, side-to-side, and heading) to work as expected. I'd also like the next three bits (altitude, bank, and pitch) to work. What might I be doing wrong, or might there be a problem in FSUIPC? As a test, I set all eight bits and found that only the first three had the expected effect.

Thanks,

Eric

Link to comment
Share on other sites

Is there a way to disable the joystick using an outside program via FSUIPC? I'd like to disable it while my program moves the plane about in slew mode.

The main slew axes are disconnected by bits in offset 310B.

I didn't find an offset for this using FS Interrogate's 3-Scan Locator. I found offset 310B, which appears to do at least what I want to do, but I've only been able to get the least significant three bits (fwd/backward, side-to-side, and heading) to work as expected. I'd also like the next three bits (altitude, bank, and pitch) to work.

All six should most certainly work -- they are all programmed in exactly the same way. I've just checked, in fact. the FS axes they deal with are those named

AXIS_SLEW_AHEAD_SET

AXIS_SLEW_SIDEWAYS_SET

AXIS_SLEW_HEADING_SET

AXIS_SLEW_ALT_SET

AXIS_SLEW_BANK_SET

AXIS_SLEW_PITCH_SET

in that order. There's zero difference between how each of these are dealt with because it is the same code -- a bit match against the control codes for the above (65867 to 86872) less 65867. i.e. numbers 0-5 used to shift a bit mask for the bit on 310B.

>> As a test, I set all eight bits and found that only the first three had the expected effect. <<

Log IPC writes, Monitor 310B to the log, and log axis events, then check the log to see what is happening.

Pete

Link to comment
Share on other sites

Thanks, Pete. I did what you said, and I figured out my problem. I was using joystick buttons, not axes, for alt, bank, and pitch. The log showed me this by showing the following events...

*** EVENT: Cntrl= 65633 (0x00010061), Param= 0 (0x00000000) SLEW_PITCH_MINUS

*** EVENT: Cntrl= 65632 (0x00010060), Param= 0 (0x00000000) SLEW_PITCH_PLUS

*** EVENT: Cntrl= 65738 (0x000100ca), Param= 0 (0x00000000) SLEW_BANK_MINUS

*** EVENT: Cntrl= 65740 (0x000100cc), Param= 0 (0x00000000) SLEW_BANK_PLUS

*** EVENT: Cntrl= 65626 (0x0001005a), Param= 0 (0x00000000) SLEW_ALTIT_MINUS

*** EVENT: Cntrl= 65625 (0x00010059), Param= 0 (0x00000000) SLEW_ALTIT_PLUS

I don't guess there's any way to disable these inputs is there? It's not that important, though, I'll be happy enough just being able to disable the joystick axes (especially AHEAD and SIDEWAYS), which I can do with 310B.

Thanks for the help.

Eric

Link to comment
Share on other sites

I was using joystick buttons, not axes, for alt, bank, and pitch.

They are different controls altogether, and the same ones you get on the Keyboard.

I don't guess there's any way to disable these inputs is there?

What for? I can sort of understand why you might want to disable axis inputs, in case you are getting jitter or interference, but surely you don't need to touch the buttons? Same would apply to the keyboard ...?

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

What for? I can sort of understand why you might want to disable axis inputs, in case you are getting jitter or interference, but surely you don't need to touch the buttons? Same would apply to the keyboard ...?

My application moves the plane around in slew mode to collect topographical data. This "scan" can take several hours, depending on the size of the area scanned. My main objective is to keep an accidental bump of the joystick from interfering with the slewing movement.

The reason I'm a little interested in the buttons or keyboard is that I've noticed that after some scans the plane's pitch angle has changed (e.g., maybe the plane's near inverted after the scan). I'm not really sure it's spurious joystick input that's causing this, but that's where I'm coming from. Come to think of it, I believe I've seen this pitch change happen even when the joystick was disabled, so maybe it's coming from elsewhere. It doesn't affect the results of the scan, though, so the problem(?) may not even warrant the amount of attention we've already given it. :D

Thanks again for the help.

Eric

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.