Abdullah Radwan Posted May 25, 2019 Report 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?
Pete Dowson Posted May 25, 2019 Report 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
Abdullah Radwan Posted May 26, 2019 Author Report 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;
Pete Dowson Posted May 26, 2019 Report 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
luis-fernandez Posted October 9, 2020 Report 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.
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