Abdullah Radwan 0 Posted May 25, 2019 Report Share Posted May 25, 2019 Hello, I am using offset 3122 to read the selected COM. This is the code I use: byte audioSelection; FSUIPC_Read(0x3122, 1, &audioSelection, &error); int comSelection = 0; if(audioSelection >= 128) comSelection = 1; else comSelection = 2; This works well with FSX (And P3D I assume, I didn't test it on P3D). However, with X-Plane 11 and XPUIPC, I got it flipped (COM2 instead of COM1, and vice versa). Is there any way to get it right? Quote Link to post Share on other sites
Pete Dowson 281 Posted May 25, 2019 Report Share Posted May 25, 2019 1 hour ago, Abdullah Radwan said: This works well with FSX (And P3D I assume, I didn't test it on P3D). However, with X-Plane 11 and XPUIPC, I got it flipped (COM2 instead of COM1, and vice versa). Is there any way to get it right? First thing would be to report the error to the XPUIPC author. To fix it in your program you'd surely just need to set your comSelection value the other way around for your X-Plane version. If you can test whether you are talking to FSX/P3D or XPlane, then just make it conditional on that. Pete Quote Link to post Share on other sites
Abdullah Radwan 0 Posted May 26, 2019 Author Report Share Posted May 26, 2019 There isn't a direct way of knowing that you are connected to XPUIPC, however, I noticed that when you are connected to XPUIPC, FSUIPC_FS_VERSION reports SIM_FSX and FSUIPC_VERSION reports 5 (which is impossible). So here is the code: bool isCom1Selected, isXPUIPC; isXPUIPC = (0x0f & (FSUIPC_Version >> 28)) == 5 && FSUIPC_FS_Version == SIM_FSX; if(audioSelection & 128) isCom1Selected = true; else isCom1Selected = false; if(isXPUIPC) isCom1Selected = !isCom1Selected; Quote Link to post Share on other sites
Pete Dowson 281 Posted May 26, 2019 Report Share Posted May 26, 2019 7 hours ago, Abdullah Radwan said: I noticed that when you are connected to XPUIPC, FSUIPC_FS_VERSION reports SIM_FSX and FSUIPC_VERSION reports 5 (which is impossible). I see. So you've got a way. Well done. Pete Quote Link to post Share on other sites
luis-fernandez 0 Posted October 9, 2020 Report Share Posted October 9, 2020 Hello... I have the same problem with one of my app. But, how to report the problem to Torsten Spiering (the author)? I can't find a way to contact him. Do you know a way? Thanks. Regards. Quote Link to post Share on other sites
John Dowson 125 Posted October 9, 2020 Report Share Posted October 9, 2020 No, sorry. Quote Link to post Share on other sites
Recommended Posts
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.