Jump to content
The simFlight Network Forums

Revisiting GoFlight EFIS Support


Recommended Posts

Hello Peter,

A while back you had asked for beta testers for the New GF MCPpro and EFIS module. I now own both of these (along with Project Magenta) and have a achieved a high degree of integration except for two functions: The mode and range selectors. These, I suspect, operate differently than a traditional encoder or switch and perhaps rely on additional logic.

If I plug the EFIS into the Project Magenta Glass Cockpit computer and use GoFlight's "GFKeys" program I can achieve full key-mapping functionality on the Mode and Range knobs, but for some reason they did not include support for the pushbutton functions of the two rotary encoders. I have contacted GoFlight separately on this issue.

If I plug the EFIS into the FS computer, I can use FSUIPC to achieve full functionality on all pushbuttons and encoders, except the Mode and range knobs, which tend to act like standard encoders. The people at GoFlight tell me that they are working with you to achieve full support on this module.

I would be happy to beta-test any new code but I am only running FS9 not FSX (although I have purchased FSUIPC and WideFS for both platforms).

The FSUIPC solution would be far more robust than the GFKeys option in that I could directly access Project Magenta Offsets, Bypassing the keyboard commands entirely.

Thanks for listening,

- Chris Baye

Link to comment
Share on other sites

If I plug the EFIS into the FS computer, I can use FSUIPC to achieve full functionality on all pushbuttons and encoders, except the Mode and range knobs, which tend to act like standard encoders.

That's the way they look to FSUIPC then.

The people at GoFlight tell me that they are working with you to achieve full support on this module.

They did? They did ask me if I would support it. I said it is difficult with no Goflight gear, and they even mentioned something about sending one. But I also replied that maybe some information about how they work would halp, but I never heard anything fursther.

I would be happy to beta-test any new code but I am only running FS9 not FSX (although I have purchased FSUIPC and WideFS for both platforms).

I'd need to know how those rotaries wortk if they are a different type of encoder -- I would have expected them to be simply multiway switches. Don't they have detentes/latches? A rotary encoder merely tells me whether you've turned it right or left, and whether fast or slow. Presumably you'd need to assign these two pairs of button readouts to Offset Byte (or Word) Increment and Decrement controls, to operate the relevant PM offsets. What have you tried that doesn't work?

Regards

Pete

Link to comment
Share on other sites

Hello Peter,

I made a complete table of switch, encoder and button functions for the GoFlight EFIS and placed them in the attached spreadsheet.

Each position of the rotary switches appears to be represented by the states of two or three buttons. Starting from the CCW-most position (lets call this pos 0) and rotating the switch CW the following beheavior is observed:

Pos 1 - btn# 16 activated in FSUIPC

Pos 2 - btn# 17 activated pressed in FSUIPC

Pos 3 - btn# 16 activated pressed in FSUIPC (Last Position)

Rotating CCW:

Pos 2 - no btn activated in FSUIPC

Pos 1 - btn# 16 activated in FSUIPC

Pos 0 - no btn activated in FSUIPC

If I could see the btn deactivated event I could confirm the beheavior. The question then becomes; How do I make use of this?

Are there some user-accessible, non-reserved offsets that could be used to store the state of the rotaries?

Once I have stored the state of the rotaries, are there facilities within FSUIPC to monitor them for change events and then activate functions like Keysend or set the states of other offsets?

Thanks,

- Chris

GoFlight EFIS Buttons.zip

Link to comment
Share on other sites

Each position of the rotary switches appears to be represented by the states of two or three buttons. Starting from the CCW-most position (lets call this pos 0) and rotating the switch CW the following beheavior is observed:

Pos 1 - btn# 16 activated in FSUIPC

Pos 2 - btn# 17 activated pressed in FSUIPC

Pos 3 - btn# 16 activated pressed in FSUIPC (Last Position)

Rotating CCW:

Pos 2 - no btn activated in FSUIPC

Pos 1 - btn# 16 activated in FSUIPC

Pos 0 - no btn activated in FSUIPC

I'm afraid this isn't really, er, scientific, enough for me to program to. Are you certain there's no dependency upon SPEED of turning at all -- for switches identified to it as rotary encoders, it operates a timer.

We really do need someone from GoFlight to tell us how these switches behave.

Are there some user-accessible, non-reserved offsets that could be used to store the state of the rotaries?

There's a Flag assoicated with each switch FSUIPC recognises, and Flags can be used in Conditional button programming and also set and cleared by special controls. See the Advanced Users guide.

I think we need information from GoFlight. It is the only sensible course in my opinion.

Regards

Pete

Link to comment
Share on other sites

Hello Peter,

I was able to achieve my goal using the FSUIPC Compound Button Function. Lines 76-79 read the mode switch and set the appropriate Project Magenta Display Mode. Lines 93-99, set the range.

Thanks for your help,

-Chris

76=CU(-170,17)170,16,C2999,5
77=CP(-170,17)170,16,C2999,3
78=CU(+170,17)170,16,C2999,1
79=CP(+170,17)170,16,C2999,4

93=CU(-170,22)(-170,21)170,20,C2999,41
94=CP(-170,22)(-170,21)170,20,C2999,42
95=CU(-170,22)(+170,21)170,20,C2999,43
96=CP(-170,22)(+170,21)170,20,C2999,44
97=CU(+170,22)(-170,21)170,20,C2999,45
98=CP(+170,22)(-170,21)170,20,C2999,46
99=CU(+170,22)(+170,21)170,20,C2999,47

Link to comment
Share on other sites

I was able to achieve my goal using the FSUIPC Compound Button Function. Lines 76-79 read the mode switch and set the appropriate Project Magenta Display Mode. Lines 93-99, set the range.

Hey, well done!

Actually that gives me enough information too to recognise the rotaries properly as 4 and 8 "buttons" respectively. I see you omitted the 8th on the range -- is that the 5 mile range you've omitted?

If I recognise these appropriately in a forthcoming update, you won't mind re-programming them will you?

Regards

Pete

Link to comment
Share on other sites

Actually that gives me enough information too to recognise the rotaries properly as 4 and 8 "buttons" respectively. I see you omitted the 8th on the range -- is that the 5 mile range you've omitted?

Yes, the 5 mile range was omitted because the GoFlight unit was not marked for it.

If I recognise these appropriately in a forthcoming update, you won't mind re-programming them will you?

My pleasure. All in all it was a good excercie as I was able to learn how to program another of your products features.

- Chris

Link to comment
Share on other sites

Peter has completed an FS9 beta version that fully supports GoFlight. It is available in the Downloads and Updates section as V3.716. An FSUIPC.ini code sample to support Project Magenta is listed below.

170 is the joystick number in the sample below. You may have to edit this in your file if your EFIS reports as another number. The usual precutions of backing up your file before editing apply. Also be sure to check for duplicate line numbers. As shown below, these lines go in the [buttons] section.

- Chris Baye

[Buttons]

100=P170,0,C2999,82
101=P170,1,C2999,96
102=P170,2,C2999,95
103=P170,3,C2999,94
104=P170,4,C2999,93
105=P170,5,C2999,90
106=P170,6,C2999,72
107=P170,8,C2999,74
108=U170,8,C2999,73
109=P170,9,C2999,75
110=U170,9,C2999,73
111=P170,10,C2999,77
112=U170,10,C2999,76
113=P170,11,C2999,78
114=U170,11,C2999,76
115=P170,12,C2999,26
116=P170,13,C2999,14
117=P170,14,Cx010004FA,x14
118=P170,15,C66040,16211
119=P170,16,C2999,5
120=P170,17,C2999,3
121=P170,18,C2999,1
122=P170,19,C2999,4
123=P170,20,C2999,41
124=P170,21,C2999,42
125=P170,22,C2999,43
126=P170,23,C2999,44
127=P170,24,C2999,45
128=P170,25,C2999,46
129=P170,26,C2999,47
130=P170,28,C65883,0
131=P170,29,C65884,0
132=P170,30,C2065,0
133=P170,31,C2064,0

Link to comment
Share on other sites

If you are using a sim that does not have specific keystrokes assigned to each Mode or Range switch-position but instead looks to those knobs for simple increment and decrement commands, I have made up this alternate code. It was made to help another simmer who uses PMDG and Level-D products.

It can be substituted for lines 119-129 in the code in the previous post. You can change the command portions of lines 120-131 and 160-165 below. Do not change the commands of any other lines unless you have read Pete's documentation. You may renumber lines as required but do not change the order of the lines, as the order of operations is critical to proper function.

- Chris

;Begin EFIS Range knob logic
;Increment or decrement Range Knob
;Reads current knob position and last knob position flag
120=CP(F+15,5)170,21,C65883,0;Inc Kohlsman
121=CP(F+15,6)170,22,C65883,0
122=CP(F+15,7)170,23,C65883,0
123=CP(F+15,8)170,24,C65883,0
124=CP(F+15,9)170,25,C65883,0
125=CP(F+15,10)170,26,C65883,0;Inc Kohlsman
126=CP(F+15,11)170,25,C65884,0 ;Dec Kohlsman
127=CP(F+15,10)170,24,C65884,0
128=CP(F+15,9)170,23,C65884,0
129=CP(F+15,8)170,22,C65884,0
130=CP(F+15,7)170,21,C65884,0
131=CP(F+15,6)170,20,C65884,0;Dec Kohlsman
;Clear and set Flags to mark last knob position
;Stores last knob position in joystick #15 flag locations.
132=P170,20,C1004,3846; Clear Flag 15,6
133=P170,20,C1003,3845; Set Flag 15,5
134=P170,21,C1004,3845 
135=P170,21,C1004,3847 
136=P170,21,C1003,3846
137=P170,22,C1004,3846 
138=P170,22,C1004,3848 
139=P170,22,C1003,3847
140=P170,23,C1004,3847 
141=P170,23,C1004,3849 
142=P170,23,C1003,3848
143=P170,24,C1004,3848 
144=P170,24,C1004,3850 
145=P170,24,C1003,3849
146=P170,25,C1004,3849 
147=P170,25,C1004,3851 
148=P170,25,C1003,3850
149=P170,26,C1004,3850 
150=P170,26,C1003,3851
;End EFIS Range knob logic

;Begin EFIS Mode knob logic
;Increment or decrement Range Knob
;Reads current knob position and last knob position flag
160=CP(F+15,0)170,17,C65883,0 ;Inc Kohlsman
161=CP(F+15,1)170,18,C65883,0 ;Inc Kohlsman
162=CP(F+15,2)170,19,C65883,0 ;Inc Kohlsman
163=CP(F+15,3)170,18,C65884,0 ;Dec Kohlsman
164=CP(F+15,2)170,17,C65884,0 ;Dec Kohlsman
165=CP(F+15,1)170,16,C65884,0 ;Dec Kohlsman
;Clear and set Flags to mark last knob position
;Stores last knob position in joystick #15 flag locations.
166=P170,16,C1004,3841; Clear Flag 15,1
167=P170,16,C1003,3840; Set Flag 15,0
168=P170,17,C1004,3840 
169=P170,17,C1004,3842 
170=P170,17,C1003,3841
171=P170,18,C1004,3841 
172=P170,18,C1004,3843 
173=P170,18,C1003,3842
174=P170,19,C1004,3852 
175=P170,19,C1003,3853
;End EFIS Mode knob logic

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.