Jump to content
The simFlight Network Forums

Help with FSUIPC / GFdisplay and Sb4


Recommended Posts

Hi,

 

Having got back into flight simming and using fsx for the first time, I'm trying to programme my Goflight P8 module with the "new" (to me) feature that allows SB4 to work with the transponder and identing, using a goflight P8 switch and a GF45 (transponder).

 

This part, programming the P8 buttons to turn the transponder from standby to Mode C (toggled on a single button) through Fsuipc 4.92 and sb4 works fine. What I then tried to do was highlight the ident on the P8 and GF45 (transponder) to light up the P8 LED and flash an "ident" mesage on the 45.

 

I came up with the following...but it doesn't seem to work and I have basically run out of ideas as to why, so I'm hoping Pete or someone may be able to help. :razz:

 

So my GFdisplay.ini looks like this:

 

[GF Connections]
GFDev=DLL found
GF45=3
GF166=1
GFP8=1
GFRP48=2
GFMCP=1

[Conditions]
0=X7B93 U8 =1; Ident Active
1=x7B91 U8 =0; Mode C
2=X7B91 U8 =1; Standby

[GFP8.0]
Needs=E B A
L0=x028C U8 =1 ;land lights
L1=x0D0C M0008 ;taxi lights
L2=x0D0C M0001 ; strobes
L3=x0D0C M0002 ; beacon
L5=X7B91 U8 =0; Mode C
L6=X7B93 U8 =1; Ident Active
L7=X0BC8 U8 !0; parking brake

[GF45.2]
Needs=E B A
D0.1=C0 ="IDNT" Ff6on 
D0.2=C1 !C0 ="Md C"
D0.3=C2 ="STBY"

 

Everything seems ok apart from the "Ident" parts..Mode c and standby are working fine on a P8 button that toggles. But the separate ident appears to do nothing - but it does ident according to a VATSIM controller I asked the other day :razz:

 

Thanks in anticipation.

Graham.

Link to comment
Share on other sites

This part, programming the P8 buttons to turn the transponder from tsandby to Mode C (toggled on a single button) through Fsuipc 4.92 and sb4 works fine. What I then tried to do was highlight the ident on the P8 and GF45 (transponder) to light up the P8 LED and flash an "ident" mesage on the 45.

 

I came up with the following...but it doens't seem to work and I have basically run out of ideas as to why, so I'm hoping Pete or someone may be able to help. :razz:

 

...

 

Everything seems ok apart from the "Ident" parts..Mode c and standby are working fine on a P8 button that toggles. But the separate ident appears to do nothing - but it does ident according to a VATSIM controller I asked the other day :razz:

 

Can you be more specific as to what doesn't work. i'm a little confused. Are you only referring to the GFDisplay script?  none of it works, or some does and some doesn't? Can you point out which is which?

 

I'm afraid i'm not at all familiar with GFdisplay these days, having some time ago replaced that entire functionality with the much more sanitory and powerful, AND easier to use and understand Lua gfd library facilities. Do you think you could switch to using those instead? Support would be soooo much easier!

 

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

 

Thanks for your reply.

 

The bit that doesn't work is the GFdisplay" bit" for the Ident, by which i mean the LED L6 on my Goflight P8 won't light and the GF45 display won't flash "IDNT" when it is pressed.

Everything else in the GFDisplay.ini works as intended with LEDs lighting up and Mode C and STDY messages working.

 

Lua may be an option if I cannot resolve this in GFDisplay, but I'm so close now, I would like to finish it in GFDisplay if at all possible....

 

Regards,

Graham.

Link to comment
Share on other sites

The bit that doesn't work is the GFdisplay" bit" for the Ident, by which i mean the LED L6 on my Goflight P8 won't light and the GF45 display won't flash "IDNT" when it is pressed.

Everything else in the GFDisplay.ini works as intended with LEDs lighting up and Mode C and STDY messages working.

 

Okay. So it's just these two lines:

 

0=X7B93 U8 =1; Ident Active

 

L6=X7B93 U8 =1; Ident Active

 

so the problem must lie in that offset 7B93. Are you sure that's being set?  Try monitoring it in the FSUIPC Logging tab (right-hand side). Maybe it isn't = 1, maybe there are other bits in use too and you need a mask?

 

Pete

Link to comment
Share on other sites

Hi Pete,

 

The P8 key used for the ident is set in FSUIPC to use the  "Xpndr Ident (SB4)" option in FSUIPC - so I was hoping you could advise if that sets x7B93?

 

I have tried setting the offset directly in FSUIPC but with no luck  i.e. P101=Cx01007B93, X01.

 

As you say it's either not being set or I'm checking for the wrong value.... All I can find is the SB offset list that Joel published years ago seems to suggest 1?

 

Quote extract: from http://squawkbox.ca/doc/sdk/fsuipc.php

0x7b93 1 Transponder Ident pressed. When the user presses the ident button on your transponder gauge, you should set this value to 1. When SquawkBox notices it is set to 1, it will transmit an ident on the network and reset the value to 0.

 

Will run some checks with logging too.

 

Thanks,

 

Graham.

Edited by grnicol
Link to comment
Share on other sites

The P8 key used for the ident is set in FSUIPC to use the  "Xpndr Ident (SB4)" option in FSUIPC - so I was hoping you could advise if that sets x7B93?

 

Yes, checking the code it simply writes 1 to 0x7B93.

 

I suspect that what is happening is that this is being read by SB4 and cleared directly (ready for the next time). Logging would show. Certainly FSUIPC doesn't clear it, so SB4 must do at some stage. It may do it immediately.

 

If this is the case then you might need to operate your displays from the button press instead of the bit being set, with a delay to clear it. I don't remember enough to be sure you can do that in GFdisplay, but you could certainly do that in Lua.

 

Ok I've done some logging.

Is there a way to get that to you or do I just cut and paste it in here?

 

 

Cut and paste is best. Only the part showing your use of the Ident.

 

Regards

Pete

Link to comment
Share on other sites

Pete,

 

Here's a couple of ident presses from the log:

 

 

Running inside FSX on Windows 7
Module base=66060000
 
  4815736 *** EVENT: Cntrl= 69967 (0x0001114f), Param= 4194304 (0x00400000)  <69967>
  4815767 Button changed: bRef=0, Joy=101, Btn=6, Pressed
  4815767 [buttons] 27=P101,6,C1122,1
  4815767 FSUIPC Control Action: Ctrl=1122, Param=1
  4815767 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000040}
 
  4816266 Button changed: bRef=0, Joy=101, Btn=6, Released
  4816266 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000000}
 
  4817576 Button changed: bRef=0, Joy=101, Btn=6, Pressed
  4817576 [buttons] 27=P101,6,C1122,1
  4817576 FSUIPC Control Action: Ctrl=1122, Param=1
  4817576 JoystickValues PCnum=0, dwCount=1, data[2]={00000065 00000040}
 
  4818076 Button changed: bRef=0, Joy=101, Btn=6, Released

 

When I also monitored the specific offset 7B93 there was no change seen from x0 during the test. Not sure if that's relevant or not.

 

Do let me know if you need more/different logging data.

 

Thanks again,

Graham.

Link to comment
Share on other sites

If this is the case then you might need to operate your displays from the button press instead of the bit being set, with a delay to clear it. I don't remember enough to be sure you can do that in GFdisplay, but you could certainly do that in Lua.

Pete,

 

The "D0.1=C0 ="IDNT" Ff6on" is meant to provide 6 flashes of "IDNT" on the G45 unit, but I'm not seeing anything on that (which at least is consistent with the lack of any p8 indication!) :razz:

 

Graham.

 

PS. I have also tried this off-line (thinking of your SB4 clearing it down theory) not sure if it should work, but nothing was seen then either to indicate that Ident was pressed. I would have thought it would IDENT and never stop (as no clearing down by SB).

Link to comment
Share on other sites

When I also monitored the specific offset 7B93 there was no change seen from x0 during the test. Not sure if that's relevant or not.

 

Yes it is. I think all is explained.

 

Looking at the code in FSUIPC it only WRITES the offset 7B93. Then, 6 times per second it interrogates this (amongst other related actions) and if 7B93 is set it sends the Ident message to SB4. It then clears 7B93.

 

It never actually writes the '1' to the READ offsets -- in FSUIPC the read and write offsets are separate. FS values and so on are read to the READ offsets whilst user applications write to the WRITE offsets. For most the update is done because the value changes and the read values change as a consequence. This makes sure that what you read is actually what is true, not simply what you set.

 

Since 7B93 only instigates an action, there was never any reason to copy that to the Read offsets. And FSUIPC clears 7B93 as soon as it does the deed. So even 7B93 read value will only be '1' for a short time -- max 1/6th second, min pretty much 0 seconds.

 

7B91 is different. it's a "mode" and stays set.

 

If you want an Ident to be indicated I think you have to do this based on your button, not on an offset.

 

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.