Jump to content
The simFlight Network Forums

Recommended Posts

Hi,

I have programmed leds for my GF-T8 module so :

[GFT8.0]

Needs=V16 B E

B=2

L0=X337D =1 ;De-ICE STRUCT size 1 on=1 off=0

L1=X029C =1 ; pitot heat size 1 on=1 off=0

L2=XD0C U16=32 ;panel lights size 2

L3=XD0C U16=4 ;land l

L4=XD0C U16=8 ;taxi lt

L5=XD0C U16=1 ;nav lt

L6=XD0C U16=2 ; beacon

L7=XD0C U16=16 ; strobe

But, leds 0 and 1 are working a moment, than go off without any action.

I have a lot of ather situations like this ;

I've found how to attach a led or display to a variable, but the led or the display are erratic, chnaged without reason, or affected when another led form same module changes its state.

What do I wrong ?

Best regards

Denis

Share this post


Link to post
Share on other sites

L0=X337D =1 ;De-ICE STRUCT size 1 on=1 off=0

L1=X029C =1 ; pitot heat size 1 on=1 off=0

L2=XD0C U16=32 ;panel lights size 2

L3=XD0C U16=4 ;land l

L4=XD0C U16=8 ;taxi lt

L5=XD0C U16=1 ;nav lt

L6=XD0C U16=2 ; beacon

L7=XD0C U16=16 ; strobe

You are misreading the documentation somewhat:

1. You missed out the offset type for 0 and 1 (e.g. U8 or U16)

2. You don't actually need the "=1" to test for non-zero: you'd be better leaving it off

3. For the offset 0D0C entries you should really have X0D0C (but it might work omitting the first 0, I don't know off-hand).

4. The conditions like "=32" says "if the value is equal to 32. This would only ever be true if the panel lights were on and all the rest off. I assume this isn't what you wanted? You want "if the value has the 32 bit set". So you need to use the Mask facility to test the individual bits. The bit worth 32 is the 2^5 bit (32=2x2x2x2x2), so the mask is M0020. Similarly 4 is M0004, 8 is M0008, 1 is M0001, 2 is M0002 and 16 is M0010.

5. In cases like "U16=32" you probably need a space before the =, because the condition "=32" is not associated with the type "U16", but with the offset. It may work without the space, but I'm not sure.

Regards

Pete

Share this post


Link to post
Share on other sites

Thak you for your quick help, i'll try it soon.

But I have other difficulties :

I would diplay current plane magheading on a GF45 :

When I try this :

D0=X2B00 F64 D-30

The displayed value i correct at beginning, but when I change the heading, the display stops a few degrees before the good one, and so it stays false till the next turn when it refreshes the value and restops befor and of turning.

I have trie a few other variables who have same behaviour

What is the trick ?

Best regards

Denis

Share this post


Link to post
Share on other sites

I would diplay current plane magheading on a GF45 :

When I try this :

D0=X2B00 F64 D-30

The displayed value i correct at beginning, but when I change the heading, the display stops a few degrees before the good one, and so it stays false till the next turn when it refreshes the value and restops befor and of turning.

That's very strange. You are comparing it with the on-screen gyro compass, are you? Not the heading? Don't forget the gyro may be drifting. You can use the Logging facilities in FSUIPC (right-hand side, monitor on screen) to see the value FSUIPC is sending. The GFdisplay program is reading the values constantly, so it really cannot get out of step in any way I know.

Maybe you should tell me rather more about your system. Are you using FSX or FS9, or something else? Are you using GFdisplay on the same PC as FS or on a WideFS client? What versions of FSUIPC, or WideFS?

And I would need to see the complete GFdisplay file, please.

Pete

Share this post


Link to post
Share on other sites

I use gyro compas, but cannot convert 0580in degrees.

I have a network, Master PC Vista64, FSX, GFDiplay FSUIPC 4.53 and Wideserver 7.53, firts slave Project Magenta PMRJ, second slave PM systems, PM CDU and PM MCP

[GF Connections]

GFDev=DLL found

GFLGT=1

GFRP48=1

GFT8=2

GF166=2

GF45=1

GFP8=1

[Conditions]

0=X500 U16 ;PM's MCP is active if this is non-zero

1=X4F0 U16 M8000 ; PMs speed is Mach

2=X7E4 U32 ; FSs speed is Mach -- see condition 46 too

3=X4F0 U16 M0002 ; PMs V/S mode

4=X3300 U16 M0100 ; FS LOC acquired

5=XC4E U16 ; CRS nonzero?

6=X4E2 U16 ; PM HDG nonzero?

7=X7CC U16 *360 /65536 ;FS's HDG nonzero?

8=X3300 U16 M0080 ; FS NAV CRS acquired

9=XBEC U16 =16383 ; Nose Gear Down

10=XBF0 U16 =16383 ; Right Gear Down

11=XBF4 U16 =16383 ; Left Gear Down

; offset 66C0 used as GF45/46 radio selector, 0-6 as follows:

12=X66c0 U8 =0 ;Radio selector 0=COM1

13=X66c0 U8 =1 ;Radio selector 1=COM2

14=X66c0 U8 =2 ;Radio selector 2=NAV1

15=X66c0 U8 =3 ;Radio selector 3=NAV2

16=X66c0 U8 =4 ;Radio selector 4=ADF1

17=X66c0 U8 =5 ;Radio selector 5=ADF2

18=X66c0 U8 =6 ;Radio selector 6=TPNR

; GF166 support includes both radios and an offset viewing debug mode

; Offset 66C4 has flag bits as follows

; bit 0 (1) = debug offset view if 0, debug type view if 1

; bit 1 (2) = debug decimal display if 0, hex display if 1

; bit 2 (4) = radio if 0, debug offset mode if 1

; bit 3 (8) = standby shown if 0, radial shown if 1

; bit 4 (16)= set by Centre button press, Cleared when released and if L or R pressed

; bit 5 (32)= set for MCP Mach display instead of IAS (FS MCP)

; Offset 66C1 used for debug mode offset type (0-12)

; Offset 66C5 used as radio selector, 0-5

; Offset 66C2 (2bytes) is offset in debug mode

19=X66C4 U8 M01 ; Offset (0) or Type (1) display mode

20=X66C4 U8 M02 ; Num value in dec (0) or hex (1)

21=X66C1 U8 =0 ; U16

22=X66C1 U8 =1 ; S8

23=X66C1 U8 =2 ; U8

24=X66C1 U8 =3 ; S16

25=X66C1 U8 =4 ; U16

26=X66C1 U8 =5 ; S32

27=X66C1 U8 =6 ; U32

28=X66C1 U8 =7 ; F32

29=X66C1 U8 =8 ; F64

30=X66C1 U8 =9 ; STR

31=X66C1 U8 =10 ; R0

32=X66C1 U8 =11 ; R1

33=X66C1 U8 =12 ; R2

34=X66C1 U8 <7 ;Fixed point

35=X66C1 U8 <9 ;Numeric

36=X66C4 U8 M04 ; Flag for Debug mode, else Radio

37=X66c5 U8 =0 ;GF166 radio selector 0=COM1

38=X66c5 U8 =1 ;GF166 radio selector 1=COM2

39=X66c5 U8 =2 ;GF166 radio selector 2=NAV1

40=X66c5 U8 =3 ;GF166 radio selector 3=NAV2

41=X66c5 U8 =4 ;GF166 radio selector 4=ADF1

42=X66c5 U8 =5 ;GF166 radio selector 5=ADF2

43=X66C4 U8 M08 ; Flag for radial display for NAV

44=X3300 U16 M0002 ;Active Nav1

45=X3300 U16 M0004 ;Active Nav2

46=!C1 !C2 X66C4 U8 M20 ;Mach not IAS

47=X051C U8 M01 ; PM blank VS

48=X051C U8 M02 ; PM blamk SPD

49=X7B91 U8 =1; Mode C

50=X7B91 U8 =0; Standby

51=X7B93 U8 =1; Ident Active

52=x3102 u8 =1

53=x2054 u8 =1 ;tank allp

54=x2054 u8 =2 ;tank left

55=x2054 u8 =6 ;tank center

56=x2054 u8 =3 ;tank right

57=x2054 u8 =13 ;crossfeed

58=x2054 u8 =14 ;crossfeed LtoR

59=x2054 u8 =15 ;crossfeed RtoL

60=x2054 u8 =14 ;crossfeed both

[GF45.0]

Needs=V16 B E A

B=4

;D0.1=!C51 C49 ="MD C"

;D0.2=!C51 C50 ="STBY"

;D0.3=C51 ="IDNT" Ff2on

;D0=X2B00 F64 D-30 ;Heading issu de Simconnect MARCHE !!!

;D0=X0580 u16 *360/(65536 *65536) f64 d-30 <<< Bad multiplier (*)

;D1=x02a0 u16 *360/(65536 *65536) <<< Bad multiplier (*)

;D1=X0580 u16 *360 d-30 f64

;D1=D-30 X2B00 F64 ;;;X08b8 u16 *140/16384 D21 ;FS's HDG as nnn ;Affiche le heading mais de manière erratique

;d0=d-30 x08f8 f64 *144 ne marche pas

;d0=x123e ;

d1=x126c ; fuel total marche !

d0.0= c53 ="ALL"

d0.1=c55 ="CNTR"

d0.2=c54 ="LAUX"

d0.3=c56 ="RAUX"

;d1=x2018

[GFP8.0]

Needs=V16 B E A

B=5

;L0=c0 X4F0 U16 M4000 ;VNAV

;L1=c0 X4F0 U16 M0040 ;LNAV

;L2=c0 X4F0 U16 M0100 ;FLCHG

L3=X281c =1 ; Battery Master

L4=X3101 U8; Alternator Master

;L5.0=Xb54 U16>10; <2000 Fslow

;L5.1=Xb54 U16>2000; <40000 Ffast

L5.0= X560E = 1

L5.1=!X560E = 1 <<< Bad literal value

;L5=xB54 u16 =44909 Ff10on; Xb54 APU on ne s'éteint pas mais s'allume size 4 32 bit float

;L6=xB54 U16 <2000

L7=c52 X2e80 ; Avionics Master

[GFT8.0]

Needs=V16 B E

B=2

L0=X337D U16 ;De-ICE STRUCT size 1 on=1 off=0

L1=X029C U16 ; pitot heat size 1 on=1 off=0

L2=X0D0C U16 M0020 ;panel lights size 2

L3=X0D0C U16 M0004 ;land l

L4=X0D0C U16 M0008 ;taxi lt

L5=X0D0C U16 M0001 ;nav lt

L6=X0D0C U16 M0002 ; beacon

L7=X0D0C U16 M0010 ; strobe

[GFT8.1]

Needs=V16 B E

B=8

;L6.0=XBAC =1 Ffast ;inner

;L6.1=XBAE =1 Ffast ;middle

;L6.2=XBB0 =1 Ffast ;outer

L7=X808 =1;yaw damper ffast size4

[GFRP48.0]

Needs=V16 B E

L0=X3590 U16 =1 ;fuelvalve eng1

L1=x3594 u16 =1 ;fuel valve eng2

;L1=X3104 =1 ;FUEL PUMP

L2.0=xAF8 =1 ;FUEL all

L2.1=xAF8 =2 Fslow;FUEL all

L3.0=xAF8 =1 ;FUEL all

L3.1=xAF8 =6 Ff5on;FUEL all

L4.0=xAF8 =1 ; fuel all

L4.1=xAF8 =3 Fslow;FUEL right

L5=X894 =1 Ff7on ;engine 1 running size2

L6=X092C U16=1 Ff7on ;engine 2 running

L7=C0 X4f0 U16 M0800 ;A/T

[GF166.0]

Needs=V16 B E A

B=5

[GF166.1]

Needs=V16 B E A

B=5

[GFLGT.0]

Needs=E B

B=5

L7=XBEC U16 =16383 ;Nose Gear Down

L6=!C9 XBEC U16 !=0 ;Nose Gear Moving

L5=XBF4 U16 =16383 ;Left Gear Down

L4=!C11 XBF4 U16 !=0 ;Left Gear Moving

L3=XBF0 U16 =16383 ;Right Gear Down

L2=!C10 XBF0 U16 !=0 ;Right Gear Moving

Share this post


Link to post
Share on other sites
I use gyro compas, but cannot convert 0580in degrees.

Why is that? You can use a multiplier and a divisor, as documented in GFDisplay.doc.

I have a network, Master PC Vista64, FSX, GFDiplay FSUIPC 4.53 and Wideserver 7.53, firts slave Project Magenta PMRJ, second slave PM systems, PM CDU and PM MCP

So you have GFdisplay running on the FSX PC? That's good. See my news about Lua at the end of this reply.

;D0=X0580 u16 *360/(65536 *65536) f64 d-30 <<< Bad multiplier (*)

;D1=x02a0 u16 *360/(65536 *65536) <<< Bad multiplier (*)

The reason for the "bad multiplier" error is that you are only allowed one multiplication and one division. You have three numbers and three operations and you've introduced parentheses () which aren't recognised either. You are simply not folowing the very basic format laid down.

Use *360 /4294967296 (i.e. do the computation 65536 * 65536 yourself instead of asking the computer to do it every time).

Even faster and more compact, do that division yourself and end up with just:

/11930464.71111

Also, on that D0= line, you declare offset 0580 to be both type "U16" and type "F64". It cannot be two types at once, and in fact both are wrong in any case -- 0580 is 4 bytes long, or 32 bits, so it is clearly a U32 type!

On the D1= line you have the wrong formula in any case, so you aren't being careful enough to read the information. To start with 02A0 is SIGNED (the mag var can be negative as well as positive!) so it is type S16, and if you do *360/(65536*65536) you will get zero as the biggest number in a 16-bit value is only 65535!

Please take more care, read what is written, do not invent your own formats, and always think about what you are doing and what the documents mean.

There seems to be a lot more errors in other lines. Please do check them yourself. Check what you are doing against the defined formats.

Incidentally, I plan to discontinue support for GFDisplay as soon as I've added GoFlight display capabilities to the Lua plug-in capabilities of FSUIPC. I'm working on that now. It is a much more powerful programming environment, and there are books on Lua programming so it saves me doing the tutorials! ;-)

Regards

Pete

Share this post


Link to post
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

×

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.