Jump to content
The simFlight Network Forums

How to write NAV freq. in fsuipc.ini?


Recommended Posts

Hi,

I really need to be pointed in the right direction here! :)

I'm not a great programmer (yet) but has a basic understanding about fsuipc, the language etc. and have successfully used fsuipc, sioc etc. for my cockpit project.

But now it gets a little bit more advanced..

Basically I need the NAV1 freq to be - lets say 108.80 when i press button 2, 3 & 4 on joy1.

How would this look in fsuipc.ini?

Thanks for any help in advance! I really appreciate it. :)

Link to comment
Share on other sites

Basically I need the NAV1 freq to be - lets say 108.80 when i press button 2, 3 & 4 on joy1.

How would this look in fsuipc.ini?

Normally you'd actually ADJUST the radio to a chosen frequency. It' unusual to directly set a specific frequency, but you cand do it by simple assignment (in FSUIPC options NOT the INI) to "Nav1 radio set" with an appropriate parameter. The parameter would be x10880 for 108.80.

Pete

Link to comment
Share on other sites

I know that you under 'normal circumstances' would adjust the radio frequencies, but I've interfaced a real com/nav control panel with the analog tape numbers as you can see in the picture below.

nav.jpg

The thing is that it works like two rotary switches. One controls the 100's and the other one controls the .00's.

For instance; If I tune 108.10, the number one rotary switch (which is interfaced through a BUO836X card) presses button #1, #2 & #3. The second rotary switch is pressing button #11 & #12.

If I rotate the #1 rotary switch one detent to the right, the tape display will show 109.10. Now the rotary switch is pressing down button #1, #2 & #4 and the second rotary switch will remain the same as before.

For this reason I'm not able to program the settings through the FSUIPC options window in FS9 as I'm using a combination of keys.

Is there any straight-forward logic in FSUIPC changing the parameter x10880 to 67712?

--------------------------------------------------------------

Something else I just discovered I have a problem with:

The button numbers in the windows game control does not match the button numbers within FSUIPC.

However; it works perfectly when assigning buttons in FS9. It's the same for all my joystick cards.

Thanks!

Link to comment
Share on other sites

Is there any straight-forward logic in FSUIPC changing the parameter x10880 to 67712?

x10880 = 67712. They are the same. One is in hexadecimal, the other decimal. FS uses hex encoding for the frequencies, but parameters are normally in decimal as that's what most folks understand.

The button numbers in the windows game control does not match the button numbers within FSUIPC.

Internally all Windows buttons number from 0 upwards, but again lots of folks don't understand counting from 0 so their "simple" user interfaces add 1. You should be able to subtract 1 to convert back without any pain?

Pete

Link to comment
Share on other sites

  • 10 months later...

Hello Pete

 

I'm bringing back up this topic, as I would like a little clarification on a (easier) way to write the NAV freq. in fsuipc.

 

I succesfully managed to interface the NAV radio last year, but i had to write a line in fsuipc for each an every radio frequency, which took me some time to do as you might imagine. 

 

Ex: I had to write a line of key-combinations for freq. 108.00, one for 108.05, one for 109.00 etc. 

 

It works perfectly good, no need to change it or write a new script. 

BUT I am now going to interface a second NAV radio + two COM radios. I can't stand to think about the amount of time I'll have to spend writing fsuipc lines for all of these radios to work!

 

Therefore I was thinking, that there might be an easier way to do this?

 

I have a series of buttons.

Lets say button1 is pressed, Can that set the ten'th in the freq. ie. 108.00

Button2 pressed = 109.00

Button3 pressed = 110.00

... and so on...

 

And button10 to set the decimal: 108.10

Button11 = 108.20

... and so on...

 

That would make the job a lot more simpel! :)

 

Thanks.

Link to comment
Share on other sites

Hello Pete

 

I'm bringing back up this topic, as I would like a little clarification on a (easier) way to write the NAV freq. in fsuipc.

 

I succesfully managed to interface the NAV radio last year, but i had to write a line in fsuipc for each an every radio frequency, which took me some time to do as you might imagine. 

 

Quite honstly I have no idea why you'd want to do all this in any case. But if you want to go ahead, I would most strongly advise programming it in a Lua plug-in, not trying to do complicated things with mere assignments in the INI file. It just doesn't suit such an approach, whereas Lua is made for it.

 

Someone has already done almost all of the work for such a plug-in. See this thread in User Contributions:

http://forum.simflight.com/topic/75409-setting-fsx-radios-obss-and-the-autopilot-using-the-keyboard-numberpad/

 

This was written for assigning the number keys on a keyboard, but there's no reason at all why the assignments can't be to buttons instead.

 

Regards

Pete

Link to comment
Share on other sites

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.