Jump to content
The simFlight Network Forums

Recommended Posts

Your implementation however shows the same anomalies as my C# wrapper (no. 99 in this topic): the ngx seems dead. I tracked it down so far that

every other time the plane gets loaded it does not send SIMCONNECT_RECV_ID_CLIENT_DATA messages to the dispatch proc.

Really? I've only ever loaded the NGX once per session. I've never heard of such a problem with client data.

I wish I'd known about this BEFORE building a brand new release! I was going to have the weekend off! :sad:

So I don't think it's fsuicp, I still hoped to find something on my side, but now I think pmdg needs a call about this. I "fixed" it by the way, by detecting a ngx load, disconnect and reconnect to simconnect.

Hmmm. Strange. Maybe it's a Simconnect bug. Seems more likely if re-connecting does the trick -- it means the Client Data is still being created by the NGX on each load.

Do you have to actually re-connect? I would try first just re-asking for the client data instead.

[LATER]

No, tried that. no good. Tried clearing the data definition and re-establishing it too. What a bummer!

I'm afraid i'm not disconnectng and re-connecting SimConnect each time. With FSUIPC's usaage that's too heavy. User's can do that if they wisg (there's an FSUIPC control for it "Re-Simconnect"), or they can reload the aircraft again. The only other way i could consider it is to open a separate SimConnect handle just for that data, but that's a lot more programming they way I have things structured.

If you do ask PMDG about it please do let me know what they say, though they may be none wiser than us about this.

[LATER STILL]

Disconnecting and re-connecting to SimConnect doesn't do it here, and neither does reloading the aircraft again! So things are different here from your system in any case.

Regards

Pete

Share this post


Link to post
Share on other sites

I'd just like to say thanks for this as it saves me time having to learn Simconnect and C++ (I program in VB.net)

The offset range in the line from the manual

The list here is simply a version of the full list in the PMDG_NGX_SDK.h file with the hexadecimal offset (6420-641F inclusive)
should be 661F. I put that range in FSInterrogate and didn't notice straight away the reason why it would only display one offset!

Also for those that jump in without reading the SDK guide from PMDG don't forget to add the following (like I didn't earlier!)

To enable the data communication output, you will need to open the file

737NGX_Options.ini that is located in the folder <FSXROOT>\PMDG\PMDG 737 NGX

Once this folder is open, add the following two lines to the bottom of the file:

[sDK]

EnableDataBroadcast=1

regards

Graham

Share this post


Link to post
Share on other sites

The offset range in the line from the manual should be 661F.

...

Also for those that jump in without reading the SDK guide from PMDG don't forget to add the following (like I didn't earlier!)

Thanks. I'll revise the PDF. I need also to point out that it only appears to work on the first loading of the PMDG airecraft -- see previous message here. Some can get it working again on every alternate load, but here you'd need to reload FSX to change aircraft and have the Client data supplied still! :sad:

[LATER]

Okay, the document is revised in the packaged 4.82.. I'll post it separately too so folks may notice.

Pete

Share this post


Link to post
Share on other sites

Thanks. I'll revise the PDF. I need also to point out that it only appears to work on the first loading of the PMDG airecraft -- see previous message here. Some can get it working again on every alternate load, but here you'd need to reload FSX to change aircraft and have the Client data supplied still! :sad:

[LATER]

Okay, the document is revised in the packaged 4.82.. I'll post it separately too so folks may notice.

Pete

Damn it! , it's also happening to me and I thought it was something in my code. I can force to restart my dll in the middle of a flight, but if I load a different flight it stops working

Share this post


Link to post
Share on other sites

...

I wish I'd known about this BEFORE building a brand new release! I was going to have the weekend off! :sad:

...

Please don't kill the messenger :)

...

If you do ask PMDG about it please do let me know what they say, though they may be none wiser than us about this.

...

I just did and will keep you informed.

Regards

Johan

Share this post


Link to post
Share on other sites

I'm testing with Fs2Crew after reloading the flight and it seems to be very wrong. Plenty of "are you sure about that" when the items are clearly correct, like anti-collision lights on, and I can't contact ground crew either, so yeah

Share this post


Link to post
Share on other sites

Pete, Why "read-only" with the PMDG SDK offsets? Do you mean that FSUIPC can only see what the SDK data is but not change any aircraft values?

I'll answer if I may - Read Only means just that. To change an offset value would mean that somewhere in an application it would have to re-read that offset to notice and act upon that change.

Hence why Pete mentions in the manual -

All offsets are READ ONLY. To change values please use the Events (known as "controls" in FSUIPC)

as listed in the "PMDG_NGX_SDK.h" file which you can find in the PMDG 737NGX SDK. The

numerical values of those controls can be used directly in button and key assignments in the

FSUIPC4.INI file, or from Lua plug-ins using the ipc.control function.

Follow that and any change in the relevent assignment you have made will be noticed within the 737NGX, updated within the 737NGX and then the appropriate value re-written to the appropriate offset for reading.

Share this post


Link to post
Share on other sites

Thank you so much for adding these offsets! Out of curiosity, is there an offset guaranteed to be non-zero if the NGX is loaded? I'm looking for a shortcut to detect the presence of the aircraft outside of the AIR file name.

Cheers!

Luke

Share this post


Link to post
Share on other sites

Thank you so much for adding these offsets! Out of curiosity, is there an offset guaranteed to be non-zero if the NGX is loaded? I'm looking for a shortcut to detect the presence of the aircraft outside of the AIR file name.

Cheers!

Luke

I use the path of the AIR file.


function loadFunct()
acPath = ipc.readSTR(0x3C00, 256)

if (string.find(acPath, "00NGX") == null) then
...
end
end

event.sim(FLIGHTLOAD, "loadFunct")
[/CODE]

Share this post


Link to post
Share on other sites

Thank you so much for adding these offsets! Out of curiosity, is there an offset guaranteed to be non-zero if the NGX is loaded?

I'd use the method from dazz if I were you. The offsets are only updated by SimConnect when the data is changed by the NGX. If it stops running the offset contents won't change. Unless one of the offsets is some sort of counter or timer which changes all the time, you wouldn't be able to see it disappear. Even if you did it would give a false positive whilst FS was stuck in a dialogue or other menu item.

Regards

Pete

Share this post


Link to post
Share on other sites

I'd use the method from dazz if I were you. The offsets are only updated by SimConnect when the data is changed by the NGX. If it stops running the offset contents won't change.

Makes sense. That's what I was doing for the FS9 737NG but I wondered if there was a "better" way.

Now this may verge on abuse of your generosity, but has there been any discussions with PMDG on getting this data for the 747 and MD-11? Even the MCP status would be a huge benefit to those of us writing flight data recorders.

Cheers!

Luke

Share this post


Link to post
Share on other sites

Makes sense. That's what I was doing for the FS9 737NG but I wondered if there was a "better" way.

Now this may verge on abuse of your generosity, but has there been any discussions with PMDG on getting this data for the 747 and MD-11? Even the MCP status would be a huge benefit to those of us writing flight data recorders.

Cheers!

Luke

I've seen mentioned on the forums that the 747 V2 and the 777 will have SDK but that nothing will be released for existing aircraft,

Share this post


Link to post
Share on other sites

Ok, here is the reply from Ryan:

When you say "every other load" do you mean loading the aircraft over itself without shutting the sim down and restarting it first? If so, that's a big no no with most complex addons - there's bugs in FSX that cause all the data to corrupt if you do that...

That makes sense, so maybe we have to live with it. I can, with just another reload :).

Regards,

Johan

Share this post


Link to post
Share on other sites

Ok, here is the reply from Ryan:

When you say "every other load" do you mean loading the aircraft over itself without shutting the sim down and restarting it first? If so, that's a big no no with most complex addons - there's bugs in FSX that cause all the data to corrupt if you do that...

That makes since,so maybe we have to live with it. I can, with just another reload :).

Regards,

Johan

Does that apply to loading, I don't know, the 900, then another NGX variant like the 800WL or 700 or whatever?

Share this post


Link to post
Share on other sites

Offset 65D5 and 65D6. These contain values for what I assume are the Idle/Cutoff switches for fuel flow that are switched open during engine start.

Both these offsets read 0 regardless of the switch state as read in FSInterrogate.

Is the data for this being written correctly to the offsets via FSUIPC?

Share this post


Link to post
Share on other sites

Offset 65D5 and 65D6. These contain values for what I assume are the Idle/Cutoff switches for fuel flow that are switched open during engine start.

From the description they should be the fuel valves, the ones indicated lit in yellow on the centre DU when starting and which extinguish when combustion occurs. That isn't the same as the starter (idle/cutoff) levers themselves and wouldn't reflect its state.

I'm actually a bit puzzled as to why those last few values are marked "used by FS2Crew" as if they aren't for anyyone else.

Is the data for this being written correctly to the offsets via FSUIPC?

The whole batch of offsets is just a complete copy of the client Data as laid out in the header file from the SDK. FSUIPC doesn't do anything with it at all. The offsets listed have been computed by me based on their relative positions in the header. Maybe there are mistakes in my counting in places. Please do advise if you find any and i'll fix the document, but all those i checked were okay. I didn't check them all, just a sort of randome sample at intervals. There's nothing in the FSUIPC code to change, it is not doing anything but plonking a wodge of data into an area for you to read.

Regards

Pete

Share this post


Link to post
Share on other sites

hi,

just wanted to inform you that a beta version of my OCP4NGX app for interfacing OpenCockpits MCP has been sent to OpenCocpits for test and verification.

You can read and write everything that is in the SDK. ( today only MCP is implemented)

This is in agreement and permission of PMDG.

More modules will be incorprated later together with the future 777 and 747 if those SDK become available.

It is freeware.

Release will be soon.

Share this post


Link to post
Share on other sites

Any green light from PMDG to implement NGX SDK in FSUIPC.

Yes. That was what the release of version 4.82 was mainly about, last week. I did announce that earlier in this very thread!

Regards

Pete

Share this post


Link to post
Share on other sites

I follow this thread since the beginning and also ngx forum but forgot to watch the updates page.

Finally we can intercat with PMDG stuff, the wall is down no more macro and boring keybord shortcuts.

Thank you very much, Pete, I am your Fan.

Fabrizio

Share this post


Link to post
Share on other sites

Hi

I have enable SDK 737NGX_Options.ini.

I use Spad, I set it with virtual Button then in FSUIPC tab Buttons+switches I select for FS control choose in the list PMDG 737NGX: AT or if use a rotary switch PMDG 737NGX: Course moins.

But there is no action.

What is the best solution to process.

Thank you

Share this post


Link to post
Share on other sites

I use Spad, I set it with virtual Button then in FSUIPC tab Buttons+switches I select for FS control choose in the list PMDG 737NGX: AT or if use a rotary switch PMDG 737NGX: Course moins.

But there is no action.

Sorry, I have no idea what you are talking about here. There are no PMDG 737NGX options listed in the buttons assignments. If you see any then they must be derived from some macro file you have installed, not part of anything i have done from the PMDG SDK.

The facilities added into FSUIPC4 for the PMDG 737NGX are merely to populate new offsets with the data provided by the SDK. That is all read-only. To control the aircraft you have to use their controls, as explained in the document included with FSUIPC 4.82.

Regards

Pete

Share this post


Link to post
Share on other sites

There are no PMDG 737NGX options listed in the buttons assignments.

Regards

Pete

lol

oK I have to read and find info on how to interact. I really wish to have a lot's of money to buy Flightdeck or similar, so the driver was already created.

Share this post


Link to post
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...

×
×
  • 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.