Jump to content
The simFlight Network Forums

Accessing <<Unknown>> FS controls Through FSUIPC


Recommended Posts

Hallo Pete

Through your FSUIPC module I noticed using your logging facility

659937 *** EVENT: Cntrl= 71281 (0x00011671), Param= 0 (0x00000000)

for the PMDG 747-400. This unknown control will select the NAV lights.

If I put this control number in the FSUIPC.INI file and ask FSUIPC to flip the switch using for example keyboard action CNTRL+Z, there is no problem.

FSUIPC seems to be quite happy to handle the control number, but is their any way to have XML coding send the number to FS2004?

Help will be greatly appreciated.

Yours

Bertus

Link to comment
Share on other sites

Through your FSUIPC module I noticed using your logging facility

659937 *** EVENT: Cntrl= 71281 (0x00011671), Param= 0 (0x00000000)

for the PMDG 747-400. This unknown control will select the NAV lights.

It must be an extra one they (PMDG) have added for their aircraft. Interesting. I wonder if there are many others?

If I put this control number in the FSUIPC.INI file and ask FSUIPC to flip the switch using for example keyboard action CNTRL+Z, there is no problem. FSUIPC seems to be quite happy to handle the control number ...

Yes, its all just numbers to FSUIPCit just won't be able to list them in the on-line options drop-downs because they aren't listed and it doesn't know their names.

but is their any way to have XML coding send the number to FS2004?

Sorry, I don't know. You've got me there. If the XML can only use the PANELS.DLL's "trigger_key_event" call then it may not get passed the table look-up in PANELS.DLL. You'd need to be able to SendMessage to the main FS window (FS98MAIN class) instead. I don't know XML but you could do it in C.

Regards,

Pete

Link to comment
Share on other sites

Hallo again Pete

I spend the past week researching your advise. I have hardly any experience in programming C (28 years ago first year university) and started learning XML 2 months ago.

From what I gather, searching through the forums, is that I need a C compiled gauge (*.gau) on my own XML gauge to communicate through your FSUIPC the FScontrols to the PMDG 747 gauges. This specially designed gauge (e.g. XML_TO_FSUIPC.gau to give a name) will enable me to link via so called L:variables in my XML coding or send an event via ”arg (>;K:EVENT)” which is equivalent to ”trigger_key_event(KEY_EVENT,arg);”.

For example to turn on the APU in the PMDG 747 I need to send:

71025 (>;K:ROTOR_BRAKE)

The 71025 argument I obtained from your FSUIPC log file and luckily for me ROTOR_BRAKE is a predefined event. For switches using this event I therefore have no problem.

But to switch on the NAV lights, I need to send FScontrol 71281 perhaps like this:

(>;K:71281)

which the specially designed gauge will be able to intercept/convert and "SendMessage to the main FS window (FS98MAIN class)" (your words).

Your FSUIPC log file list all the FScontrol numbers needed to to switch on the BOOST PUMPS, PACK CONTROLS, etc. and I would like to use them to design my own First Officer.

I hope I understand what needed to be done and are on the right track. Designing this special gauge are of course at present beyond my ability. I posted a request for help at the AVSIM forum (Panels and Gauges) a week or more ago but to no avail. I was hoping someone like DOUG DAWSON might take an interest. Perhaps I was not insistent enough? I have never posted in a forum before and now have a feeling that I might have touched on a taboo subject.

If you have time to spare, would you kindly help me with this gauge? I do have Microsoft Visual Studio.net. If not then perhaps only some comments on my efforts thus far which I can then use to approach the forums again.

Yours

Bertus

BandH@skeletoncoastsafaris.com

Link to comment
Share on other sites

From what I gather, searching through the forums, is that I need a C compiled gauge (*.gau) on my own XML gauge to communicate through your FSUIPC the FScontrols to the PMDG 747 gauges.

Well, you shouldn't really need to use FSUIPC at all. If you find the window handle for the top-level window of class "FS98MAIN", then you can send the controls direct yourself, using SendMessage, or probably safer, PostMessage. You use the WM_COMMAND message for this, with wParam set to your found control number, and the parameter, if any (else 0) in the lParam. This is, in fact, all that FSUIPC would do for you in any case.

The only advantage of using FSUIPC is that you would also have available to you all the extra (non-FS) controls FSUIPC has added (see list in the Advanced Users document).

which the specially designed gauge will be able to intercept/convert and "SendMessage to the main FS window (FS98MAIN class)" (your words).

Yes yes. you do understand, then, that you don't need FSUIPC for this. It doesn't enter the picture, except as a means of you identifying these PMDG-special controls.

I have never posted in a forum before and now have a feeling that I might have touched on a taboo subject.

Well, I wouldn't have thought so, though PMDG might not be pleased if they were thinking of making a new profitable module themselves for this. But there is likely to be quite a few folks with external hardware and PMDG aircraft who could also program in C. Try asking here, with a more direct (suggestive) subject line, and also in the FS2004 Forum.

If you have time to spare, would you kindly help me with this gauge? I do have Microsoft Visual Studio.net.

Sorry, I won't have time at all till late February, and I am expecting other work to crop up. I really cannot accept addiitonal commitments.

Have you looked at the C examples of gauges in the MS SDK? You sohlud be able to adapt one.

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.