Jump to content
The simFlight Network Forums

Programming GFDisplay


Recommended Posts

Hi Pete,

I try to use your GFDisplay program and try to "code" the ini-file, with only little success (FSUIPC and WideFS are at the latest release-level).

Okay you generously left the programming of a GFT8 to the user because its so simple but ......

Do I understand it right:

With FSUIPC i "program" a key (a control) that sets a value somewhere. In GFDisplay I have to "find" that value (offset) write a "condition" and "test" it?

But where would I find which "control" sets which "offset"?

I also give you just a little example which I did:

14=X3101 S8; Alternator Master

15=X3102 S8; Battery Master

16=X3103 S8; Avionics Master

[GFT8.0]

L0=C14=1

L0=!C14=0

L1=C15=1

L1=!C15=0

L2=C16=1

L2=!C16=0

It works but did I do it too complicated or correct?

Regards

Klaus

Link to comment
Share on other sites

Do I understand it right:

With FSUIPC i "program" a key (a control) that sets a value somewhere. In GFDisplay I have to "find" that value (offset) write a "condition" and "test" it?

Eryou need to start with explaining what you want to accomplish, not in the middle like this. 99.9% of anything you may want to display already has a value in an offset somewhere in FS. Are you adding something not at all supported by FS, like signalling the stewardess to bring you a cup of coffee? :)

But where would I find which "control" sets which "offset"?

Until you explain what you are attempting to do, there is no answer possible to that.

All the FS controls are listed in the list of FS controls provided in the FSUIPC.ZIP (and listed in the FS buttons & keys dropdowns), and all the added FSUIPC controls are listed in the FSUIPC Advanced User's documentation (and also included in the dropdowns).

All the FSUIPC offsets already programmed with some information are listed in the big table in the Programmer's Guide, which is part of the FSUIPC SDK.

I also give you just a little example which I did:

...

It works but did I do it too complicated or correct?

It works more by luck than design. If you have more than one line operating on an object (display or LED) they need to be numbered, thus:

[GFT8.0] 
L0.1=C14=1 
L0.2=!C14=0 
L1.1=C15=1 
L1.2=!C15=0 
L2.1=C16=1 
L2.2=!C16=0

otherwise all that happens is that the first, or maybe the last (sorry, I can't tell without looking up the code) will be used only.

In this case, by luck, it doesn't matter which is used -- the LED is set when the right hand side is "true" (non-zero), cleared when "false" (zero).

And you don't need Conditions for this, so it is even more complicated than it should be. All you would need is:

[GFT8.0]
L0=X3101 U8; Alternator Master
L1=X3102 U8; Battery Master
L2=X3103 U8; Avionics Master

The LEDs are lit if the result is non-zero, extinguished if the result is zero.

I changed the variable type to "U8" instead of "S8" because, though it makes no practical difference in this case, they are really just unsigned bytes. The fact that you aren't using the numerical value, just the "zero-ness" of them makes it irrelevant of course.

Regards

Pete

Link to comment
Share on other sites

Thank you Pete for your fast response.

I surely believe you should get the "gold-medal" for the best and fastest responses in the flightsimmer forums.

So what I want to do is:

1. Assign a function in FS9 (eg. Toggle Battery Master) to a button or switch (however you call it) on the GF-T8. This I do with FSUIPC. In the FSUIPC.ini I find the "Control" (eg.: C66241 for Toggle Battery Master).

2. Now I want the LED above the switch to be lit when the Battery Master switch is "on".

If I understand you right I have to look in the FSUIPC SDK to find out which offset is used by the "Battery Master".

Thanks for your advice. I will give it a new try.

Regards

Klaus

Link to comment
Share on other sites

1. Assign a function in FS9 (eg. Toggle Battery Master) to a button or switch (however you call it) on the GF-T8. This I do with FSUIPC. In the FSUIPC.ini I find the "Control" (eg.: C66241 for Toggle Battery Master).

Yes, correct. but you don't need to find anything in FSUIPC.INI. You simply need to find the correct offset which indicates the state of the master battery.

If I understand you right I have to look in the FSUIPC SDK to find out which offset is used by the "Battery Master".

Yes. And this is offset 3102, as you have already ascertained! There's also another at 281C which was found after I had made FSUIPC set the 3102 offset. There are some duplications like that, arising historically. Either will do.

Regards,

Pete

Link to comment
Share on other sites

  • 1 month later...

Hi Pete,

I have made some progress with programming my GoFlight Modules with FSUIPC and GFDisplay.

My problem is that I still do not understand where I can get the right information to set "GFDisplay.ini" correct.

I am trying to assign buttons for the PM MCP to a GF-RP48. With FSUIPC it was no problem to assign the correct buttons. But now I want to "illuminate" the lights at the RP48. I found out that you use a "Offset" (X04F0) and a "Bitmap" (eg: M0001 for Autopilot 1). But I could not find out what you set when I press VNAV, LNAV and when I press the buttons on the "ND" (eg.: PM ND VOR Display) etc.

The "Control number" in the GFDisplay does not help as I obviously need some "Hex-Value". The documentation for the FSUIPC SDK does not help for PM.

Can you give me a hint where and how I find the information I need.

Regards

Klaus

Link to comment
Share on other sites

I found out that you use a "Offset" (X04F0) and a "Bitmap" (eg: M0001 for Autopilot 1). But I could not find out what you set when I press VNAV, LNAV and when I press the buttons on the "ND" (eg.: PM ND VOR Display) etc.

The "Control number" in the GFDisplay does not help as I obviously need some "Hex-Value". The documentation for the FSUIPC SDK does not help for PM.

Can you give me a hint where and how I find the information I need.

Obviously PM documentation is to do with PM, it isn't mine. The PM offsets in FSUIPC are all fully documented where they've always been documented, in the PM offsets document on the PM documentation site:

http://www.projectmagenta.com/resources/docs.html

You'll see all the MCP/FCU indicators listed at offset 04F0, thus:

MCP/FCU Lights (Read Only)

Boeing-Type MCP

Bit Light

0 A/P Master L (1)

1 A/P Master C (2)

2 VS

3 ALT HLD

4 APP

5 LOC

6 LNAV

7 HDG

8 FLCH

9 SPD

10 THR

11 A/T

12 F/D

13 A/P Master R

14 VNAV

15 Mach

Airbus -Type FCU

Bit Light

0 AP 1

1 AP 2

2 VS

3 ALT HLD

4 APP

5 LOC

6 Managed Heading (LNAV/LAT)

7 HDG

8 LVL CH

9 SPD

10 THR

11 AT

12 FD

13 Managed Speed (VNAV)

14 Managed Altitude (VNAV)

15 Mach

Since you already know bit 0 is the AP 1 switch, how come you don't see LNAV and VNAV (for example) listed too? For a Boeing MCP, LNAV is evidently bit 6 (M0040) and VNAV bit 14 (M4000).

Regards

Pete

Link to comment
Share on other sites

I played with "FSInterrogate" and also found some "Offsets" in the GFDisplay documentation. But I admit I was not aware of the documentation from PM. Sorry!

No need to be sorry. You'll find everything you need to know about the main PM offsets in that document, but if you use pmSystems too the only list is the Sysvars.txt file inside the pmSystems package.

Regards,

Pete

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.