Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I have an external radio stack. Its controller keeps track of the different dial settings and sends them periodically to a PC running FSUIPC.

For example, if I am frantically turning the NAV1 MHz button to the left, the PC may get the following data, spaced at 0.1 s intervals:

23, 20, 16, 12, 8, 3, 254, 251, ...

Notice the wraparound of the byte value. It is fairly easy to convert this to 'number of ticks per interval':

-3, -4, -4, -4, -5, -5, -3, ...

The question: what would be the best way to control the radio stack MHz value ?

1. Read the frequency settings from offset 0x0350, calculate the new MHz value including limit checking and write it back.

2. Send one or more (key ?) commands to FS (via FSUIPC) telling it to increase or decrease the setting by an amount of -3, -4, etc ?

I'm inclined to option 2 (the ADF has 2 offsets to check and set, for example and I must take care not to update any values when the avionics power is OFF) but I don't know how I could use FSUIPC to do it. Ideally I want a situation in which I turn ten ticks, and the value changes by exactly ten ticks as well.

Jeroen.

Posted

The question: what would be the best way to control the radio stack MHz value ?

1. Read the frequency settings from offset 0x0350, calculate the new MHz value including limit checking and write it back.

2. Send one or more (key ?) commands to FS (via FSUIPC) telling it to increase or decrease the setting by an amount of -3, -4, etc ?

Without any doubt, choice 1 -- with one proviso. Keep the copy you wrote back and use that, don't read a new one, if the next update is within, say half a second or so (you'd need to experiment). If more than this interval occurs with no update, read a new value from FS next time. If you don't take this precaution then you may get stuttering or stuck values as you read back the previous value -- i.e. before FS has actually implemented the change FSUIPC has sent to it.

This is the technique I used for the FlightLink TR-1 and KR-1 stacks (via EPIC), and I also do this in the PFC driver. Sending increments and decrements leads to overruns or overruns, it just isn't precise because of the message queuing in Windows and in FS.

In FS98 there were no such problems because the actual values used by FS were those in the locations you could write to directly through FS6IPC or FSUIPC. The same was more or less true in FS2000, but it all changed drastically in FS2002 -- FSUIPC can only make the changes effective by calling procedures in FS.

I'm inclined to option 2 (the ADF has 2 offsets to check and set, for example and I must take care not to update any values when the avionics power is OFF) but I don't know how I could use FSUIPC to do it. Ideally I want a situation in which I turn ten ticks, and the value changes by exactly ten ticks as well.

Sorry, but really option 1 is the only way of ensuring that.

Regards,

Pete

Posted

I've implemented option 1. Works fine. Thanks for the support.

In fact, the only remaining problem I have is to shut the radios down. Every radio has a mode switch with an OFF position. I can clear the displays in this case, but FS still operates as if the radio is alive. Again I have 2 options:

1. Write 1 in 0xB70 or an unspecified value in 0x3BE1.

2. Tune the radio to 108.00 MHz.

Switching off the avionics is out of the question; it turns off all radios at once.

Jeroen.

Posted

In fact, the only remaining problem I have is to shut the radios down. Every radio has a mode switch with an OFF position. I can clear the displays in this case, but FS still operates as if the radio is alive. Again I have 2 options:

1. Write 1 in 0xB70 or an unspecified value in 0x3BE1.

2. Tune the radio to 108.00 MHz.

The value in 3BE1 isn't really unspecified. it's a flag. it's either true (non-zero) or false (zero). Just use 1 for true.

Regards,

Pete

Posted

Hi,

i hope someone can help me. Iam new in programming with FSUIPC.

I wanted to know if following is working:

I want to build a aNAV/COM/XPDR/ADF input device. I have the Aerosoft MCP 747 panel and connected over an expansion port rotary switches.

I want the following, when i turn the switch it sould change the nav freq before the dot example: 123 to 119 and with an other rotary the 2 digits behind the dot. with a normal switch i want change it from standby to operationg and the operating to standby. This should word with NAV1/NAV2/COM/ ADF and i want to set the transponder code via push buttons. And at least, perfekt would be to change also the QNH settings.

But, thats my biggest problem, i dont have programmed with FSUIPC until yet.

Can anyone give me an example for COM or NAV, then i can copy this command and change it to the other things i need. please, help me..... 8)

thanks for your help.

greetings

Mark

Posted

i hope someone can help me. Iam new in programming with FSUIPC.

I'm afraid I don't fully understand your question. You say "I have the Aerosoft MCP 747 panel and connected over an expansion port rotary switches.". How does this get programmed? Have you got information from Aerosoft on how to replace their driver, or is there some other method?

If you are after writing a program to interface the Aerosoft MCP, then it is a big and complex task. I really cannot give programming tutorials nor do the programming for people -- most especially not in languages I don't know, like VB. It takes all the time I have to do what I do already, and I am definitely NOT a good teacher.

I can answer specific questions, but you have to work at solving the problems first. If you are new to programming I would really advise learning programming some other way, first.

If, on the other hand, it isn't FSUIPC programming you need, but some way of setting values in Aerosoft MCP control program to do what you need with FSUIPC, then this sounds easier, if you have the details. If not then maybe it's a question for the Aerosoft MCP forum. Do you have any documentation for the Aerosoft MCP to tell you how to program your switches?

I do have an Aerosoft MCP, and EFIS panels and EICAS button panel, but these are all handled by Aerosoft's own control program. I'm not really sure how you get home-made bits working through it. Certainly, if the Aerosoft program allows you to specify FS controls then that should be easy enough without any programming.

On the other hand if it allows you change bits at specified offsets, then you could make your switches into "virtual buttons" using the FSUIPC offsets at 3340. In fact I think I allocated enough bits there to cover every possible button you could connect to the MCP.

Once all your switches and buttons are flagged through different bits in those offsets, they will be recognised by FSUIPC when pressed, and shown in the FSUIPC "Buttons" page. You can then program them there to action whatever FS controls you like.

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.