Jump to content
The simFlight Network Forums

FSUIPC Control Using Momentary and Toggle Switches


Recommended Posts

Pete,

I need your help programming switches in FSUIPC Keys section.

I believe you are aware of the difficulty understanding offsets in SA-WXR documentation. Me too, and I know every little about hex.

I have finally decided to use a GoFlight remote mount unit to send a Key command to FUSIPC. From there, FSUIPC will send the offset bit values to SA-WRX. GoFlight unit will be plugged in the FS9 server and SAWXR is on a client with pmRJ.

Here is my question. Does FSUIPC see a momentary switch the same as a toggle switch?

SA-WXR will be controlled with toggle and rotary switches. NO monentary switches. A fellow SA-WXR user has, with your help, given me offset bit values to turn on switches. Due to SA-WXR coding I believe, a clearing bit must be sent after each switch is used.

Would the clearing bit xFFFF, work regardless of switch type?

How does the clearing bit get sent if a toggle switch is placed in the On position and not turned Off.

Lets use the Ground Clutter Suppression switch as an example. If I turn On GCS, how does the clearing bit get sent to activate other switches if I keep GSC On throughout the flight?

Through testing, I am able to control SA-WXR with FSUIPC and a GoFlight P8 (momentary push button switch) but I do not have a T8 toggle switch unit to test with.

I would appreciate any help you can give.

Best Regards,

Richard

Link to comment
Share on other sites

Here is my question. Does FSUIPC see a momentary switch the same as a toggle switch?

For programming, FSUIPC only sees a button or switch go from being "open" (not set, off, or zero) to being "closed" (set, on, or non-zero).

In use, however, it can be programmed for an action when going from open to closed (off to on) and a different one, as you like, going from closed to open (on to off). FSUIPC terms the former "press" and the latter "release", as if it were just a button.

The only difference between a latching (toggle) switch and a momentary (button) one is that with the former the two events, press and release, will usually be completely separate events, whilst with a momentary button the release will follow the press as soon as you take your finger off.

Due to SA-WXR coding I believe, a clearing bit must be sent after each switch is used.

Would the clearing bit xFFFF, work regardless of switch type?

How does the clearing bit get sent if a toggle switch is placed in the On position and not turned Off.

That would indeed be a problem. Though you can make one switch event send more than one control (by editing the INI, a complete sequence could be sent on one press), the problem is that if the events merely change the same offset, as I think you need here, that is going to happen so fast that there is really no chance that SA_WXR will see the correct intervening values.

You would need to either toggle or turn your switch again, or have a separate button to send the clearing value.

Possibly some exchanges with the SA_WXR author, Florian, would be beneficial? His interface doesn't seem to be so well thought out for easy button or switch programming, being more oriented towards other applications I think. Possibly he could come up with some improvements? If he needs more FSUIPC offsets he only has to ask.

Regards,

Pete

Link to comment
Share on other sites

Thanks for the pointers Pete. Doesn't sound like my GoFlight idea will work without assigning a clearing value switch. A rather unrealistic procedure eyerytime I want to change the radar range, mode, etc.

Yes, I do believe SA-WXR could use some rework. I have made many requests to the author but apparently his involvement in PSS 777 is more important than helping SA-WXR customers. His replies in the AOG forum explains much.

Regards,

Richard

Link to comment
Share on other sites

Thanks for the pointers Pete. Doesn't sound like my GoFlight idea will work without assigning a clearing value switch. A rather unrealistic procedure eyerytime I want to change the radar range, mode, etc.

Well, that' rather a shame. I can put on my list a facility for a seondary action (probably only programmable in the INI file) to take place n seconds after the switch was operated, but I'm afraid there's no way it will get done this year, and I'm on holiday in January. If you have no solution by February get back to me and ask again.

Regards,

Pete

Link to comment
Share on other sites

Thanks for the pointers Pete. Doesn't sound like my GoFlight idea will work without assigning a clearing value switch. A rather unrealistic procedure eyerytime I want to change the radar range, mode, etc.

It occurs to me that, if you are running SA_WXR on a WideFS Client PC, why not simply use keystrokes? I assume SA_WXR accepts keyboard commands for its assorted options? If you have WideClient load SA_WXR then it is easy enough to program KeySends in the Client INI file to send it the requisite keystrokes, and the keysends can be assigned to your "button" signals in FSUIPC.

Regards,

Pete

Link to comment
Share on other sites

I'll look at that again. I seem to remember asking that in an earlier post. Seems that "focus" to the SA-WXR program was the problem.

If SA_WXR is loaded by WideClient then it may be able to receive the keys direct, without gaining focus. It depends whether WideClient can get its actual running Window handle. You direct the KeySend to the "Run..." program in the INI parameter. You could try with PostKeys=Yes or No. One might work.

The awkward programs are those which don't create the window which you need to send the keypresses too till later, using some othe introductory window first. even that should work IF the later, desired, Window is a child of the first.

Regards,

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.