bjratchf Posted February 20, 2020 Report Posted February 20, 2020 I'm using an autopilot panel produced by Realsimgear (GFC500) https://realsimgear.com/products/realsimgear-gfc500-autopilot-for-x-plane-p3d-fsx ... It is recognized by my PC as a USB Serial device (occupying COM 3 port)... Since it's not showing up in my list of joysticks- I can't get it to be recognized by FSUIPC the easy way (press a hardware button and have it recognized by FSUIPC to assign it a function) . Realsimgear uses an exe as its device interface to P3D (in the P3D addon folder). When P3D is running, pushing a hardware button sends a "Prepar3D Event" through their device interface which has to be one of the Event ID's listed in the P3D SDKs (or so it seems)... I've tried to map event IDs from your FSUIPC list - such as 65792 or the HEX form of that- 0x10100 (this is for AUTOPILOT_ON) but it doesn't seem to do anything. " Flight level change" is another hardware button but P3D doesn't have this in it's event list- so I don't know how I'd handle this. Support from RealsimGear shed this clue: "buttons should be mapped to the correct SimConnect id's. We have not tried this, but it may be possible (we are much more familiar with how X-Plane works). The way our P3D Add-on works, it listens for serial commands coming from the hardware, then does a lookup indexed off that command in the CommandMapping.ini file and then fires the SimConnect event identified there. Now, if FSUIPC can listen to custom off-sets, then you could set custom offsets in CommandMapping.ini as well (we do this for integration with Mindstar G1000 for instance). If you give this a go, we would be interested in knowing how it works for you." I have tried LINDA to see if it would "hear" the button pushes from my hardware- but it seems to only go through the device interface right to the sim. Otherwise I think FSUIPC would hear it too. I'm quite a layman with programming- so Lvars, custom offsets are a bit beyond my pay grade here with unsigned bites etc. Attached are pics of the device interface "in action" when I have a button pushed... as well as the commandMapping.ini that they use to translate hardware button pushes into P3D event commands. CommandMapping.ini
Pete Dowson Posted February 20, 2020 Report Posted February 20, 2020 5 hours ago, bjratchf said: I've tried to map event IDs from your FSUIPC list - such as 65792 or the HEX form of that- 0x10100 (this is for AUTOPILOT_ON) but it doesn't seem to do anything. How are you trying to "map" an event, and to what? FSUIPC logs events but it has no facilities as it stands to change them. It logs them en route to the Sim. FSUIPC itself causes such events to occur when you assign to them. If you need to make an event do something other than what it is designed to do you woud need to use a Lua plug-in, which can intercept them. See event.control in the Lua library PDF. 5 hours ago, bjratchf said: Flight level change" is another hardware button but P3D doesn't have this in it's event list- so I don't know how I'd handle this. FLCH isn't a built-in function, that's why. It's specific to particular cockpits with Autopilots equipped with such, so it will have to be handled specifically per cockpit using whatever means are provided for it. 5 hours ago, bjratchf said: The way our P3D Add-on works, it listens for serial commands coming from the hardware, then does a lookup indexed off that command in the CommandMapping.ini file and then fires the SimConnect event identified there. Well, it sounds like you can program it to do what you like then. I don't know what add-on aircraft you intend to use, but if it's one of the PMDG Boeings then they use added control numbers (events) for most of their switches, dials, axes and knobs, so you could map directly for those. For others you could choose a control / event number outside of the assignable FS /P3D range (see the lists provided) and use a lua plug-in to perform whatever action you need, as already mentioned. Pete
bjratchf Posted February 21, 2020 Author Report Posted February 21, 2020 Sorry if my post was confusing. Please realize that I'm at the basic end of knowing how to program this stuff: my experience is only "push a button, see it pop up in FSUIPC and assign it a number which corresponds to some action." The great thing about FSUIPC is that you can have different "actions" or "event numbers" for different aircraft, since each developer will use different commands to move the heading bug, or engage the autopilot. It appears though with this realsimgear interface that I can only use- or have only had success using, standard P3D event IDs- and not even numbers or HEX- just the named simconnect action. I beta test for the maddog md80- and have tried to replace buttons with HEX/ID numbers, but it doesn't do anything in-sim. So are you saying that by writing a lua script I can take a standard simconnect named function, have it intercepted, and have FSUIPC do something else with it (like a custom code function as used by a third party aircraft?)
John Dowson Posted February 21, 2020 Report Posted February 21, 2020 2 hours ago, bjratchf said: So are you saying that by writing a lua script I can take a standard simconnect named function, have it intercepted You intercept SimConnect events (also known as controls in FSUIPC, slightly confusing) not named functions (whatever they are!) with the lua event.control function. See the FSUIPC Lua Library.pdf in your FSUIPC documents folder. In the function called on the intercept, you can then do whatever you want (thats available!) - for example, send different events/controls using ipc.control (also documented in same pdf previously mentioned), read/write to offsets, etc.. 2 hours ago, bjratchf said: like a custom code function as used by a third party aircraft? Not quite sure what you mean by this , but if you mean a custom event, then yes (via ipc.control as previously stated). Cheers, John
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