Jump to content
The simFlight Network Forums

Programing a simple switch using a I/O card.


 Share

Recommended Posts

Pete,

this may be a question for my I/O card supplier ( I have posted with no respoce yet) but here it goes.....

I am trying to program a simple switch for FS9.'

Specifically,I am working on getting the Autopilot AT arm switch to work.

The switch is either off or on,it does not have 2 "on" positions.

with this in mine,when using offset $0810 can get the AT function to work, but I have to cycle it on and off to trigger it .

Is it possible (thru FSUIPC) to have the fs9 recognize the switch as;

No signal, default to "Off"

signal, turn AT "ON"

Or do I have to make another trip to the electronics store and buy a 2pole switch?

Thanks,

Polmer

Link to comment
Share on other sites

Specifically,I am working on getting the Autopilot AT arm switch to work.

The switch is either off or on,it does not have 2 "on" positions.

with this in mine,when using offset $0810 can get the AT function to work, but I have to cycle it on and off to trigger it .

What has the FSUIPC offset 0810 to do with it? Are you writing a program to interface to FSUIPC? If so, just write 1 to 0810 to ARM, write 0 to disarm. Your program will have to detect the switch going off to on, and on to off, and take the appropriate action.

Is it possible (thru FSUIPC) to have the fs9 recognize the switch as;

No signal, default to "Off"

signal, turn AT "ON"

"Signal". Sorry, that is not an appropriate term to understand in this context. What is a "signal" to a piece of software?

If the switch is recognised, through the Windows joystick interface, as a "button", then you can program it in FSUIPC's Buttons facilities. If you look you will see the you can program the "Press" separately from the "Release" of a button. Did you look?

A toggle switch, such as the one you describe, is effectively "pressed" when you switch it from off-to-on. Program that to set Autothrottle Arm. When you switch it from "On" to "Off" that is like releasing the button. Program that for Autothrottle disarm.

Now, as it happens, FS only provides a TOGGLE control for Autothrottle, so effectively you have to program both press and release to use the SAME FS control, "Autothrottle Arm". Then then the only thing to be sure of is to synchronize the switch with the state of the A/T Arm switch in FS. Once you''ve done that it should stay in sync.

The alternative is to use the FSUIPC added control "Offset Dword Set". Assign that with offset x0810 with a parameter of 1 on press and 0 on release.

Or do I have to make another trip to the electronics store and buy a 2pole switch?

No, of course not. You are only changing one condition. FSUIPC recognises off-to-on as Press and on-to-off as Release! Didn't you notice the facilities for both settings in the options? They are actually documented too!

Pete

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.