piotr66 Posted September 18, 2020 Report Posted September 18, 2020 14 minutes ago, Paul Henty said: Have you enabled the CDU broadcast in the PMDG ini file? Yes, of course, but with one difference: [SDK] EnableDataBroadcast=1 EnableCDUBroadcast.0=1 EnableCDUBroadcast.1=0 Is it wrong? I just don’t need First Office CDU.
Paul Henty Posted September 18, 2020 Report Posted September 18, 2020 That's OK. Can you post your code here so I can check it? Paul
piotr66 Posted September 18, 2020 Report Posted September 18, 2020 Here You are: PMDG_NGX_CDU_Screen cdu = new PMDG_NGX_CDU_Screen(5400); cdu.RefreshData(); if (cdu.Powered) { PMDG_NGX_CDU_Row row0 = cdu.Rows[0]; string cduText = cdu.ToString("\r\n"); string row0Text = cdu.Rows[0].ToString(); string row1Text = cdu.Rows[1].ToString(); string row2Text = cdu.Rows[2].ToString(); string row3Text = cdu.Rows[3].ToString(); string row4Text = cdu.Rows[4].ToString(); string row5Text = cdu.Rows[5].ToString(); txtFMC.Text = row0Text + Environment.NewLine; txtFMC.Text = row1Text + Environment.NewLine; txtFMC.Text = row2Text + Environment.NewLine; txtFMC.Text = row3Text + Environment.NewLine; txtFMC.Text = row4Text + Environment.NewLine; txtFMC.Text = row5Text + Environment.NewLine; } else { txtStatus.Text += "CDU -> No Power"; } Btw. cdu.Powered gives my always false. Maybe this helps.
Paul Henty Posted September 18, 2020 Report Posted September 18, 2020 The offset address should be in hexadecimal: PMDG_NGX_CDU_Screen cdu = new PMDG_NGX_CDU_Screen(0x5400); Paul
piotr66 Posted September 18, 2020 Report Posted September 18, 2020 Now it looks this way: Rows[0].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 Rows[1].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 Rows[2].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 Rows[3].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 Rows[4].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 Rows[5].ToString() - \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
Paul Henty Posted September 18, 2020 Report Posted September 18, 2020 Is cdu.Powered still false? Which plane are you using? Paul
piotr66 Posted September 18, 2020 Report Posted September 18, 2020 Yes. CDU -> No Power PMDG 737-600NGX.
Paul Henty Posted September 18, 2020 Report Posted September 18, 2020 Looks like the PMDG info just isn't being broadcast. It would be worth trying some of the other PMDG offsets and see if they work. If they don't, it's definitely a problem with the PMDG broadcast rather than your (or my) code. Paul
piotr66 Posted September 18, 2020 Report Posted September 18, 2020 I believe I have PMDG broadcast . I’m using app called MobiFlight for home cockpit builders and I’m able to get all PMDG offset. I’m displaying on LCD or LED display all MPC values (HDG,) and change those values using rotary encoders. It’s working with no problem. But MobiFlight is using Pete Dowson version of FSUIPCDotNetClient2.4. Doing this with C# and Yours FSUIP CClient I’m only learning. Is it correctly? private Offset<byte> MPC_HDG = new Offset<byte>(0x652C); FSUIPCConnection.Process(); this.txtStatus.Text = MPC_HDG.Value.ToString(); and it seems to work. What I set in FSX, I can see in my C# test app.
Paul Henty Posted September 19, 2020 Report Posted September 19, 2020 Yes the broadcast is working fine then. I really don't know what else to suggest other than to make sure you have the latest updates to whatever version of FSUIPC you are using, my dll, and the PMDG Aircraft. Paul
Skino2412 Posted September 19, 2020 Report Posted September 19, 2020 Tonight I upload my working project as source code. Maybe it will help.
piotr66 Posted September 19, 2020 Report Posted September 19, 2020 5 hours ago, Skino2412 said: Tonight I upload my working project as source code. Maybe it will help. Thank You very much. I was looking for such a thing.But please tell me, where I can find this upload? I'm new on this forum.
Skino2412 Posted September 19, 2020 Report Posted September 19, 2020 In my hurry I found only an incomplete project but even this should help. https://drive.google.com/drive/folders/1bdzEpNQefkNCt_3BVppJ6Ckr8bF9VP1k?usp=sharing
piotr66 Posted September 19, 2020 Report Posted September 19, 2020 1 hour ago, Skino2412 said: In my hurry I found only an incomplete project but even this should help. And it helps, thank You. Unfortunately effect is the same. ☹ FSUIPC version is 4.975a - the last version for FSX Paul Henty DLL version is 3.1.21.239 (Skino2412 use 3.1.4.305)PMDG Aircraft – this is what left to check Could You tell me what version PMDG 737NGX do You have?
Skino2412 Posted September 20, 2020 Report Posted September 20, 2020 If you start the simulator as administrator your program must be started as administrator and vice versa. Otherwise fsuipc does not deliver any data.
Paul Henty Posted September 20, 2020 Report Posted September 20, 2020 I can confirm this is working with the 3.1.21 version of my DLL. Also FSUIPC Version 4.975a. This is the code I used: Just a simple form with a button and a text box. public frmCDUTest() { InitializeComponent(); } private PMDG_NGX_CDU_Screen cdu0 = null; private void frmCDUTest_Load(object sender, EventArgs e) { FSUIPCConnection.Open(); cdu0 = new PMDG_NGX_CDU_Screen(0x5400); } private void Button1_Click(object sender, EventArgs e) { cdu0.RefreshData(); this.txtCDU.Text = cdu0.ToString("\r\n"); } Using the PMDG 737-800 NGX. In the file: \SteamLibrary\steamapps\common\FSX\PMDG\PMDG 737 NGX\737NGX_Options.ini I added: [SDK] EnableDataBroadcast=1 EnableCDUBroadcast.0=1 EnableCDUBroadcast.1=0 PMDG Version numbers: On the CDU: PMDG Setup -> About says 1.1 In the document: \SteamLibrary\steamapps\common\FSX\PMDG\PMDG 737 NGX\README_PMDG_737-800-900_NGX.txt it says: v1.10.6461 at the top. Hope that helps... Paul
piotr66 Posted September 20, 2020 Report Posted September 20, 2020 Know I’m all stupid. 😞 We have the same version - CDU: PMDG Setup -> 1.1, README_PMDG_737-800-900_NGX.txt and README_PMDG_737-806-700_NGX.txt - v1.10.6461
Paul Henty Posted September 20, 2020 Report Posted September 20, 2020 Sorry Piotr, I really don't know what the problem could be. You haven't put the .ini file entries in FSUIPC4,.ini by mistake? Paul
piotr66 Posted September 20, 2020 Report Posted September 20, 2020 1 hour ago, Paul Henty said: You haven't put the .ini file entries in FSUIPC4,.ini by mistake? What kind of entires? Today I made experiment. With my laptop I went to my friend, who has P3Dv4.5 and PMDG 737NGX. And You know what? It’s working. My code (for the truth it’d Yours), Skino2412 code and it works beautifully. One one hand – good to know that the code is workig. On the other – why not on my computers. Eh...
Paul Henty Posted September 20, 2020 Report Posted September 20, 2020 Quote What kind of entires? These ones: [SDK] EnableDataBroadcast=1 EnableCDUBroadcast.0=1 EnableCDUBroadcast.1=0 You definitely have them in \FSX\PMDG\PMDG 737 NGX\737NGX_Options.ini Not in the FSUIPC4.ini? Paul
piotr66 Posted September 20, 2020 Report Posted September 20, 2020 No, never. They are in NGX_Options.ini
Thomas Richter Posted September 20, 2020 Report Posted September 20, 2020 Hi, check those are set to Auto or Yes, at least for the PMDG model you use. Those are in FSUIPC INI file within the [General] section. Quote [General] . . . PMDG737offsets=Auto PMDG747offsets=Auto PMDG777offsets=Auto The PMDG aircraft offset support is not enabled all the time unless specifically required. The option is controlled by these three parameters in the [General] section of the FSUIPC5.INI fileThe default “Auto” setting makes the offset support start only when the aircraft is loaded. This assumes the text “PMDG” and “7x7” (x as appropriate) are found anywhere in the pathname to the add-on’s AIR file. For all PMDG installations which haven’t been very much user modified this should be the case, but otherwise you can force the support by setting “Yes” instead of “Auto”. To prevent any PMDG offsets support at all, just set these parameters to “No”. This should not be needed except to possibly avoid or diagnose problems. Thomas
piotr66 Posted September 20, 2020 Report Posted September 20, 2020 Thank You very much for advice, but unfortunately noting change.
Thomas Richter Posted September 20, 2020 Report Posted September 20, 2020 Hi, Btw- did you check with FSUIPC logging IPC read/write? As PMDG doesn't use FSUIPC itself the logging doesn't get hammered. It might give an idea what read requests are there. Thomas
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now