mroschk Posted October 11, 2015 Report Posted October 11, 2015 Hi Volks, i must again ask for help with this Offset. Now it is the ATC Menu which makes Problems. With this Code i got now the Doors to work: sendControl.Value = TOGGLE_AIRCRAFT_EXIT; Fsuipc_Process(); Thread.Sleep(50); if(iDoorNumber == 0) sendControl.Value = SELECT_1; if(iDoorNumber == 1) sendControl.Value = SELECT_2; if(iDoorNumber == 2) sendControl.Value = SELECT_3; if(iDoorNumber == 3) sendControl.Value = SELECT_4; Fsuipc_Process(); Now i tried the ATC Menu and add this constants: private readonly int ATC = 65564; private readonly int ATC_MENU_0 = 66181; private readonly int ATC_MENU_1 = 66172; private readonly int ATC_MENU_2 = 66173; private readonly int ATC_MENU_3 = 66174; private readonly int ATC_MENU_4 = 66175; private readonly int ATC_MENU_5 = 66176; private readonly int ATC_MENU_6 = 66177; private readonly int ATC_MENU_7 = 66178; private readonly int ATC_MENU_8 = 66179; private readonly int ATC_MENU_9 = 66180; and created this Code to manage the ATC Window switch(msg) { case "O": sendControl.Value = ATC; break; case "0": sendControl.Value = ATC_MENU_0; break; case "1": sendControl.Value = ATC_MENU_1; break; case "2": sendControl.Value = ATC_MENU_2; break; case "3": sendControl.Value = ATC_MENU_3; break; case "4": sendControl.Value = ATC_MENU_4; break; case "5": sendControl.Value = ATC_MENU_5; break; case "6": sendControl.Value = ATC_MENU_6; break; case "7": sendControl.Value = ATC_MENU_7; break; case "8": sendControl.Value = ATC_MENU_8; break; case "9": sendControl.Value = ATC_MENU_9; break; } Fsuipc_Process(); When i now call this procedure and give the Variable "msg" the String "O" it opens the ATC Menu. When i call it again and the ATC Menu is still open , then the ATC Menu Closes ... Thats perfect ! But when i open the ATC Menu and give then "msg" the string "1" or "2" it dosent work. The other Problem is that same Code works in Prepar3d v2.5 but not in my actual Prepar3d v3. I also checked Offset 3110 in your FSI and it becomes the correct value. Have you any idea ? Matthias
Paul Henty Posted October 11, 2015 Report Posted October 11, 2015 Hi Matthias, I've tried your code here (the switch statement and readonly variables) and it works fine for all ATC options in FSX. You must have something else causing a problem that you haven't posted. It might be worth posting the declarations for the relevant offsets, and the code in fsuipc_process(). I don't have any version of p3d so I can't comment on that. Try asking Pete in the main support forum, but make sure you update to the latest FSUIPC4 version in the downloads subforum first. Paul
mroschk Posted October 11, 2015 Author Report Posted October 11, 2015 Hello, thanks for the Answer. Before i have installed P3D v3 i had FSX and after that P3D v2.5. Also hee works the Code fine. So there is no Problem, which is the reason i did not post the other Code. I think there is maybe anything changed in V3. Can pls anyone test it in v3 ? Thanks Matthias
Pete Dowson Posted October 11, 2015 Report Posted October 11, 2015 Hello, thanks for the Answer. Before i have installed P3D v3 i had FSX and after that P3D v2.5. Also hee works the Code fine. So there is no Problem, which is the reason i did not post the other Code. I think there is maybe anything changed in V3. Can pls anyone test it in v3 ? Thanks Matthias I think there are LOTS of problems with key events and axes in P3Dv3. I haven't unravelled it all yet, but they've changed so many things I don't know how long it will take to sort it out. It looks like much of the SimConnect system is now incompatible. I'm hoping we can get things worked out, but I suspect it'll need updates from L-M, because I'm not about to rewrite FSUIPC completely! Meanwhile, do try FSUIPC version 4.947c, just uploaded. I seem to be having to make twice daily updates to keep up with what we are discovering about P3Dv3. v:-( Pete
mroschk Posted October 12, 2015 Author Report Posted October 12, 2015 Hi Pete, thanks for the Answer. So i know now this is not my issue ( and not really your's ). Where can i get FSUIPC 4.947C ? On the Website i see only v 4.946. Matthias
Pete Dowson Posted October 12, 2015 Report Posted October 12, 2015 Where can i get FSUIPC 4.947C ? On the Website i see only v 4.946. The Schiratti website merely links to the same files you can download from the Download Links subforum here, and here is where all interim updates and release information is always available. Mr. Schiratti sometimes updates the text on his "Dowson Page" website, but no matter what the text says, the links are laways up to date becausde they link to the are here which can control. BTW I tried using the ATC controls, in all three ways -- the ones actually assigned in P3Dv3 itself, assigning in FSUIPC to keypresses or buttons, AND by writing the control values to 3110. In all cases the main ATC control, to show or hide the ATC menu, works, but none of the selection controls work (ATC_MENU_n). I'll be reporting this to L-M if it hasn't already been done. Perhaps you should also report this explicitly to L-M on their P3Dv3 support forum? Pete
mroschk Posted October 12, 2015 Author Report Posted October 12, 2015 Hi Pete, thats the same here. Open/Close the ATC Window works fine, but not able to select the Numbers. I will Report this also to LM. Matthias PS: http://www.prepar3d.com/forum/viewforum.php?f=6312
mroschk Posted October 15, 2015 Author Report Posted October 15, 2015 He Pete, is it possible ( for a temporary Solution ) to send a KeyPress ( 0...9 for the ATC Window ) via FSUIPC Offset and without needed to give P3D the Focus? Matthias
Pete Dowson Posted October 15, 2015 Report Posted October 15, 2015 is it possible ( for a temporary Solution ) to send a KeyPress ( 0...9 for the ATC Window ) via FSUIPC Offset and without needed to give P3D the Focus? I don't know what P3Dv3's ATC window needs. You could test with a plug-in using the Lua function ipc.keypress which doesn't change focus, and with ipc.keypressplus which allows you to change focus to FS and return it.to whence it came. Personally I would never use the default ATC. I'm currently a Radar Contact user, but looking with interest at ProATC-X. Pete
mroschk Posted October 15, 2015 Author Report Posted October 15, 2015 Hello Pete, i can not use LUA for that because i Need to Control it via SIOC. Thats the only way i can use. ( i also never use the ATC from the Sim, it is for the users ) Matthias
Pete Dowson Posted October 15, 2015 Report Posted October 15, 2015 i can not use LUA for that because i Need to Control it via SIOC. Thats the only way i can use. Well you can try sending a keypress using offsets 3110/3114 with the FSUIPC-added control to send a key (see the list in the Advanced User's Guide), but I think this will need FS to have the focus. Can SIOC send keypresses itself? Pete
mroschk Posted October 16, 2015 Author Report Posted October 16, 2015 Hello, yes, SIOC can. The question is if P3D or the ATC window must have the Focus and what is the Name of the Window to find it and set the Focus to it. Matthias
Pete Dowson Posted October 16, 2015 Report Posted October 16, 2015 yes, SIOC can. The question is if P3D or the ATC window must have the Focus and what is the Name of the Window to find it and set the Focus to it. SIOC can set focus to a specific window? Pete
mroschk Posted October 16, 2015 Author Report Posted October 16, 2015 i have not tried yet...i will inform you
mroschk Posted October 16, 2015 Author Report Posted October 16, 2015 hmm, it seams not. How can i send as example a keypress "1" to P3D via c# in Connection with Offset 3110/3114 ?? Have you an example in c# or c++ ? Thanks
Pete Dowson Posted October 16, 2015 Report Posted October 16, 2015 How can i send as example a keypress "1" to P3D via c# in Connection with Offset 3110/3114 ?? Have you an example in c# or c++ ? You need to send the Keypress code into 3114 and then the keypress control to 3110. Please see the FSUIPC Advanced User's guide. The correct numbers and format are given on page 31 -- control number 1070 does a press then release. The C# or C++ would depend on what library you are using, but it is just calls to write to FSUIPC offsets. Pete Pete
mroschk Posted October 16, 2015 Author Report Posted October 16, 2015 I dont know what you mean with "What Library i use", i am using the FSUIPC.dll, if you mean that. What else can i use with C#?? But i got it working. Thanks Matthias
Pete Dowson Posted October 17, 2015 Report Posted October 17, 2015 I dont know what you mean with "What Library i use", i am using the FSUIPC.dll, if you mean that. What else can i use with C#?? You are writing this thread in a SubForum dedicated to the use of Paul Henty's library for interfacing to FSUIPC -- look at the title FSUIPC Client DLL for .NET The FSUIPC SDK also contains a much more basic Library to interface to FSUIPC in C/C++. There may be others for the other languages included in the SDK (I don't know C# or the other languages, only C and ASM). Or maybe you are writing your own functions to do the interfacing? All ways are different for the code you write, but all you need to know is how to write an offset. There must be examples for whichever method you use. Have you looked? If you are starting out writing your very first program to iinterface to FSUIPC, then examples are going to be useful. Check the SDK and look again through the SubForum you are currently using. Pete
mroschk Posted October 17, 2015 Author Report Posted October 17, 2015 i am using the dll from your SDK and had a look in the example. But i did not find a example how to use this 2 Offsets.
Pete Dowson Posted October 17, 2015 Report Posted October 17, 2015 i am using the dll from your SDK and had a look in the example. But i did not find a example how to use this 2 Offsets. There's no DLL in the SDK. You mean the LIB? Why are you posting in the SunForum for Paul Henty's library if you are not using it? You don't need a specific example. Writing to any offset is the same as any other. You need to open the link, first, then, when connected, any time you need to write you use FSUIPC_Write, either once for both offsets together (8 bytes) or twice, first for 3114 then for 3110 (4 bytes each), And an FSUIPC_Process call to make it happen. Repeat when needed. Any example containing a Read or a Write would do. The only real different between a Read and a Write is the command itself, and the only difference between offsets, as far as these commands are concerned, are the numbers of bytes. I am at a loss to understand what it is you fail to grasp. Have you done any programming before this? If not then this is probably not the place to start. Pete
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