dazz Posted November 15, 2010 Report Posted November 15, 2010 I'm ready to use this wonderful feature (the VRInsight plugin) to re-map my MCP-Combi for all my planes. Just one question please. Is it possible to set the filters separately for each aircraft (or better, for each profile)? I guess it's not, but I could get around that with a function that returns the A/C & profile in use. Not the most elegant solution, but it would do Thanks in advance
Pete Dowson Posted November 15, 2010 Report Posted November 15, 2010 Just one question please. Is it possible to set the filters separately for each aircraft (or better, for each profile)? No, sorry. And it is far from a trivial job to implement. Best to filter off all the commands you want to handle and then simply treat them differently according to the aircraft loaded. I could get around that with a function that returns the A/C & profile in use. You can read all sorts of things about the aircraft currently loaded by reading the appropriate offsets. The aircraft title, for instance, is read by title = ipc.readSTR(0x3D00,256) Unfortunately, at present the name of the Profile in use, if you are using Profiles, isn't available through the Offsets. Shame you didn't ask me for this a few days ago -- it would have been easy enough to fit it before the updates I've just released. As it is now my time is rather committed for at least the next two weeks. But I'll put it on my list if you think you'd find it useful. Regards Pete
dazz Posted November 15, 2010 Author Report Posted November 15, 2010 Well, my question was quite stupid now I think of it: of course I know which A/C is in use since the lua plugin to be run depends on the [Auto] section that is set for each plane. Sorry about that. That 3D00 offset would do the trick too, thanks. Knowing the aircraft in use I know the profile in use too, so it is not really needed to query the profile. It would still be usefull to avoid needing to edit the Lua plugin each time an aircraft is added or removed from a certain profile, but still not something necessary. It would be nice to have that offset if and only if it's a really simple thing to do. The filtering is another story. If I got it right (this time), it will limit was is sent/received to/from the driver (SerialFP2) Each time a new aircraft is loaded the the right plugin in the A/C [Auto] section is executed for what I can see: wouldn't it be possible to dinamically load the filters for each plane/profile upon A/C loading? Of course I'm not aware of the implications and it's not a deal breaker anyway but the thing is that if I have for example the LSD767 upgrading properly the panel screens, but I would like to implement a screen refresh for a PMDG A/C, I would need to set different filters for each one if I got it right Again I think I got confused, that's not something I can control in the lua plugin right? I mean everything is sent/received to the driver unless you filter it?
Pete Dowson Posted November 15, 2010 Report Posted November 15, 2010 It would be nice to have that offset if and only if it's a really simple thing to do. Yes, it should be easy enough, providing I can find the space to avoid having another query protocol. I've put it on my list and will look at it early December. Each time a new aircraft is loaded the the right plugin in the A/C [Auto] section is executed for what I can see:wouldn't it be possible to dinamically load the filters for each plane/profile upon A/C loading? Yes, it is possible. Just a lot more work, that's all. And really it shouldn't be necessary. I would have thought that you'd want to filter out all those commands which might vary between aircraft in any case. If you still want SerialFP2 to handle some of those (or the device to handle SerialFP2's) you can still pass them on. All the filtering does is stop the straight-through copying back and forth. Again I think I got confused, that's not something I can control in the lua plugin right? I mean everything is sent/received to the driver unless you filter it? Yes. And if you filter it, you get to decide in your Lua program. Pete
dazz Posted November 15, 2010 Author Report Posted November 15, 2010 Ahhhh, ok! so I would simply need to do something like this: WrFilter.1=<displayFilters> -- in the FSUIPC4.ini driver = com.open(VRIdriver, speed, handshake) device = com.open(VRIdevice, speed, handshake) title = ipc.readSTR(0x3D00,256) function filterDisplays(handle, str) if title = "LDS 767" then --forward to the driver com.write(driver, str, 8) else -- manage the displays myself end end event.VRIwrite(device, "filterDisplays") Fair enough, no need to mess around with the filters then. Thanks 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