• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA SimConnect DLL declared as .gau in panel.cfg?

Kekelekou

Resource contributor
Messages
226
Country
france
Hello there !


I am developing a XML Damage Mod for the Flight1 BN-2 Islander, and I have come to the conclusion that I need an “intercept, mask and pass” module for the joystick throttle.

I simulate engine failure through a limited max THROTTLE_SET value (say 70%). This means that if the pilot pushes the levers to the max position, they spring back to 70%, what is an immersion killer and the proof that the engine has failed (always nice to keep the pilot wondering about what is going on).

I managed in the last few days to edit the animations and their codes, so that the spring-back effect is cancelled with mouse inputs.

BUT since joystick inputs override everything else (L:vars, mouse rects, etc), a slowly moving joystick throttle still results in a twitching lever in the VC.

Hence the SimConnect module that :

- intercepts any joystick throttle input

- masks them to FSX

- passes the throttle input to a L:Var for XML postprocessing (subtracting 30%, then K:Throttle_Set)

- is declared as a gauge in the panel.cfg, just like Doug Dawson’s sound gauges (so that module runs only when BN-22 is flown)


WIth no C++ experience so far, I am trying to proceed step by step with the SDK samples with Visual C++ 2010 Express Edition and the FSXA SDK.

I have managed to compile and run an exe (is that a SimConnect client?) that intercepts and masks the brake input (modified Input Event project from the SDK). I have also compiled the code as a DLL (declared in DLL.xml) which runs fine in FSX too.


But after a few hours of head banging against a wall, I have decided to ask for help…

I have renamed the InputDLL.dll to InputDLL.gau, and added a gauge03=InputDLL, 0,0,0,0 in the VC section of the panel.cfg. To no avail. Is renaming enough to “transform” a SimConnect DLL into a gau gauge? Is it possible to declare a SimConnect gauge from the panel.cfg in the first place?


Thank you for your help.


I am afraid I’ll have more questions when I come to the L:Var vs DLL connection.
 
All compiled gauges are dll's, even if their file extension is .gau. However, not all dll's are gauges, as you have discovered.
Gauges have a specific set of internal structures that allows the FS panel interface to load them. If you have a look at the sample gauge source code that comes with the SDK, you will see what I mean.
if you want to see an example of source code for a gauge that uses SimConnect, download the FSX source code for my fuel dump gauge, from my website: www.douglassdawson.ca
There is a wiki entry here dealing with reading and writing L:Vars from C gauges
 
Hello Doug.

Thank you for your input. I was focused on SimConnect but didn’t think of looking into the Panels and Gauges section of the SDK.
Your gauge is much a better example for my needs compares to the ones in the SDK, so, beside using it for my Damage Mod, I’ll know how it works.
 
Well, the fuel dump gauge looks quite complicated from my newbie point of view : lots of SimConnect callbaks and so on.
The GDI+ example from the resources features much simpler functions, what makes them more readable for a less knowledgeable.
I writes that down for further reference.

So I’ll start from the GDI+ project and adapt it to my needs.


Link tontje sample gauge :
http://www.fsdeveloper.com/forum/resources/gdi-gauges-drawing-msdn-example.162/
 
Last edited:
Back
Top