Author Topic: NGX refuling Lua Variables  (Read 5997 times)

Guenseli

  • Full Member
  • ***
  • Posts: 122
NGX refuling Lua Variables
« on: February 06, 2012, 11:49:15 pm »
Hello Umberto,

I think you know this, but in case not:

if you are able (I think so?) to send LUA variables with GSX to FSX, then you could send the following LUA variables to bring up the NGX FMC 1 (left) Fuel page:

Code: [Select]
    ipc.control(66507, 402)
    ipc.sleep(10)
    ipc.control(70183, 536870912)
    ipc.sleep(10)
    ipc.control(70176, 536870912)
    ipc.sleep(10)
    ipc.control(70166, 536870912)

Same could be done with payload also of course.

If you are interested and need probably further informations, please ask.

Greetings,
Günter


virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51238
    • VIRTUALI Sagl
Re: NGX refuling Lua Variables
« Reply #1 on: February 06, 2012, 11:57:53 pm »
Yes, of course we can do that, that technique it's gauges with Custom simulator events, I made the presentation about it at the ACES Devcon in 2007, because we used it extensively in the F/A-18, the modeldef.xml that is supplied with FSX still includes all the tags that I defined...

So yes, we could control the NGX very easily (already tried and it works), it's just a matter of knowing if it could have potentially dangerous side effects.

Guenseli

  • Full Member
  • ***
  • Posts: 122
Re: NGX refuling Lua Variables
« Reply #2 on: February 07, 2012, 12:11:27 am »
good to know.

Maybe you have heard about LINDA.
As I'm the module developer I have a bit of knowledge about several LUA variables of the NGX.
So there's no need for you to that work twice.


Just drop me a note if you have questions!




btw: would be great if GSX could be controlled by LUA variables, too!
(if possible in any way and would make sense)

Günter

rsm2000e

  • Jr. Member
  • **
  • Posts: 57
  • B738 Pilot AAL-211 YouTube Channel rsm2000e
    • Visit my YouTube Channel today!
Re: NGX refuling Lua Variables
« Reply #3 on: March 12, 2012, 11:17:21 pm »
good to know.

Maybe you have heard about LINDA.
As I'm the module developer I have a bit of knowledge about several LUA variables of the NGX.
So there's no need for you to that work twice.


Just drop me a note if you have questions!




btw: would be great if GSX could be controlled by LUA variables, too!
(if possible in any way and would make sense)

Günter

I second that emotion!  It would be wonderful for a pilot to be able to assign buttons on his control surface (for example I use the VRInsight MCP Combo II (Boeing) unit which has 8 programmable buttons!) that could interface with GSX!  That way we could immerse ourselves more by 'disappearing' the GSX menu completely and assigning button presses direct from our control surface via LINDA!! (Lua Variables)

Thanks for considering this idea ?

Robert McDonald
California

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51238
    • VIRTUALI Sagl
Re: NGX refuling Lua Variables
« Reply #4 on: March 13, 2012, 11:10:25 am »
That way we could immerse ourselves more by 'disappearing' the GSX menu completely and assigning button presses direct from our control surface via LINDA!! (Lua Variables)

This has been discussed already, there is an API in the GSX future, once the program will be completed with all its features (we are still missing de-icing, water/lavatory and gpu vehicles), but we'll not use anything that would require another 3rd party product to work, in this case would be FSUIPC to enable LUA access.

Instead, we'll use standard Simconnect features, which means addons for GSX without requiring to use anything extra than plain FSX SDK, and it would also automatically work over a network, which is another desirable feature. The Simconnect approach is also language-neutral because, as long there's a language binding for Simconnect (it's native C++, but I believe it's possible to use C# or Visual Basic too), one can use the language of his own choice, without having to be restricted to a specific language.

The recently released SDK from PMDG, for example, works in the same way, and that's the correct way of doing things, for a native FSX addon like this one.

Pete Dowson

  • Beta tester
  • Jr. Member
  • *****
  • Posts: 94
Re: NGX refuling Lua Variables
« Reply #5 on: March 13, 2012, 12:54:54 pm »
Instead, we'll use standard Simconnect features, which means addons for GSX without requiring to use anything extra than plain FSX SDK, and it would also automatically work over a network, which is another desirable feature. The Simconnect approach is also language-neutral because, as long there's a language binding for Simconnect (it's native C++, but I believe it's possible to use C# or Visual Basic too), one can use the language of his own choice, without having to be restricted to a specific language.

If and when you do this I can add an interface to it to FSUIPC for LINDA and other Lua plug-in writers. And even assignable controls. It's moving the menu to a separate PC I'm really interested in, so if the menu text can be supplied via SimConnect client data too, that'd be great. I have already added a simple text window display facility via the WideClient Lua plug-in library facilities.

I was looking for ways to trap the FSX window display text and forward it in such a manner, but so far I've not located the correct place in FSX code. I'm not as good at hacking into FS as I used to be, and neither have I the patience needed these days! I put it down to age (and wine and beer I expect).

Best Regards
Pete
« Last Edit: March 13, 2012, 12:56:32 pm by Pete Dowson »