MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
SteveMunro
Posts: 10
Hello everyone, Seasons greetings !

I have a 16 X 1 LCD connected to an I2C Serial interface (address of 0x3F). This is connected to an Arduino Mega for the purpose of displaying the IRS outputs from the PMDG 737 NGX overhead panel. The I2C board is connected to pins 20 SDA & 21 SCL on the Arduino.

I am using the FSUIPC Offsets of 0x6C5A (string 0 to 7 Bytes) IRS Left display and 0x6C61 (String 0 to 8 Bytes) IRS Right display.

Once the IRS is aligned and both IRS Display switches are moved to NAV the LCD display shows the correct information in the form of Latitude and Longitude but flickers / flashes continuously, as if the data is being refreshed repeatedly this is backed up by the TX / RX lights on the Arduino Mega board also flashing. If the DISPL SEL switch is rotated to any other position I get the correct output but again the display appears to be constantly refreshing.

I would only expect the data to be sent once in the same way that it reads an input from an encoder or switch operation, have I made an obvious error??

Regards,

Steve Munro

Steve
[Last edited by SteveMunro, 2019-12-27 09:40]
2019-12-26 20:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Not see your Config..... But sounds you try to write ONE Display with TWO Configs. ( Cause exactly then and only then the flickering happend normaly)

So i think you have Config 1 that Read 6C5A and show it on Display ...... And Config 2 that read 6C61 and show it on SAME Display as Device ( Just on other Diggits)
THEN Config A will show "Blanks" on the Area where Config B try to show Data ..... And inverted Config B show Blanks on the Area where Config A show Data.

A Display must be controlled by ONE Config same time ONLY !!


Solution:
Create THREE Configs:
Config 1 Read 6C5A and have NO DEVICE
Config 2 Read 6C61 and also have NO DEVICE

Config 3 Read no Value ( Use Offset 0000 like preselected) ...... Device is your LCD Display
In "Placeholder" Section you define Config A as Placeholder 1 Symbol # eg. And Config 2 as Placeholder 2 Symbol % e.g.
In Display Tab you say something like "######## %%%%%%%%"

Now BOTH Values are used in that Config and shown on Display..... But all is done via ONE Config same time.

In Simple Words.... The Config that controll the LCD mostly not read a value itself..... It just use Placeholders ( Values from other Configs) and show it on the Display...... With that technic you can show 6 different things on one Display..... Controlled by one config.

(Basicly the Display Config can read a value, too.... Thats "$" then. So you can reduce number of Configs by 1 if you also read a value there.)
Good Luck !
2019-12-27 13:17
Avatar
SteveMunro
Posts: 10
Happy New Year......

One word " GENIUS"

Thank you very much, problem solved, you identified exactly what I had done and I would never have thought of this solution.

This can be marked as solved !!

Regards,

Steve.
2019-12-29 16:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Not a Genius :blush:

Just a user like each other here, who did the same mistake long time ago and remember to it. ;)
Good Luck !
2019-12-30 09:51
Avatar
Dogepanda
From: Schagen, Netherlands
Posts: 12
Hi there,

I tried this too and it works but if I turn off the LCD in the sim and FSUIPC gives no value the symbols # and % stay on the LCD Display. Is there any solution for that?

Regards,

Tijmen
2020-07-18 00:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Tijmen

YES. there is.... But a little bit difficult !

Why it happen:
Cause PMDG work a bit lazy here. In Therory they should write this String Offsets with "blanks" so "space characters" if the Display need to be blank.
But they not do this.... They simply reduce the length of the string to "nothing" ..... means they terminate the string on the first position by a "0" Value to that Byte.

Now Mobiflight have a Problem.... We tell the config to Read a String 6C5A .... And Mobiflight will read it until the terminating Zero is occure ( what is perfect normaly) But NOW the terminating Zero is still on Position 1 ( exactly on 6C5A) ... So Mobiflight can not read a Value and execute the ####### Symbols cause it can not give them a value simply cause there exist no value for it on that Offset!

Solution:
1. PMDG will fix this.... They still fix it in ELEC Display String Offsets.... But i not think they will do again. If yes then only for the NGX"u" in the far future.
2. Mobiflight will fix this.... I Request to Sebastian in our Next meeting. Maybe he can rebuild the Logic but thats pretty sure not a Top Priority. Will take time or not come.

3. Improvisional Solution.
Here i must test myself cause this was done a long time ago by me for a other user.
The basic logic is.....
You read with 2 new Configs the First Bytes of the String Offsets as a INT.
So 6C5A 1 Byte INT ...... And ...... 6C61 1 Byte INT
If the Display show something then this Offsets read a Number between 1 and 255 ( Whatever Character is shown.... Also a Space e.g.)
BUT If the Display is Blank in PMDG ( the situation our Problem occure) then this Byte is exactly ZERO "0" .

Finaly we must use this information as a condition..... So we say IF this Offset show 0 THEN the Display should show 8x Spaces ELSE it should show Value of String.
Badly i not remember directly how i build this formula ( and where exactly i make it) cause in case of a String Value this was difficult and need some tricky bypasses!

Please if you still advanced.... Try yourself . If you not find a way request here again then i will figure out and give you a guide !
Good Luck !
2020-07-18 10:52
Avatar
Dogepanda
From: Schagen, Netherlands
Posts: 12
Hello,

Thats indeed a bit lazy from PMDG's side...

However I found a fix myself.. I did the 3 config method you explained and in the 3th config I selected IRS Left and IRS Right config in the config references, but as symbol, I used 2 invisible symbols I found on a website. The symbols are detected my mobiflight but do not show on the IRS LCD. Works really well.

Thanks for your help!
2020-07-18 11:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Wow

Thats interesting.
Please a Link to that webside or a short guide how to use those symbols !
Good Luck !
2020-07-18 12:14
Avatar
Dogepanda
From: Schagen, Netherlands
Posts: 12
Sure!

I will explain step by step. The invisible symbols are between " " Just copy paste them in Mobiflight

1. Make the 2 configs for IRS Left and IRS Right with offsets 6C5A and 6C61 with no device.

2. Make the 3th config: Offset 0x0000 select config reference IRS Left with the invisible symbol: " "
Then select the IRS Right config reference and copy paste this symbol there: '' "

3. Then go to the display tab, select the LCD. Then in display settings select the LCD

4. In the Text section copy and paste the first invisible symbol from the IRS Left 6 times in the top line
Then copy and paste the second invisible symbol from the IRS Right 7 times in the line below that
(Because PMDG Airplane has 6 figures on Left and 7 figures on Right.)

5. Thats it! Click on ok and test it in the sim. Let me know if it works for you!

Regards,

Tijmen
2020-07-18 16:54
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Thank you again.... I will try it next days....

At last. Can you link me the webside you got this ?????

From point of view of Mobiflight support it is not "enough" for me to copy paste it.... I want to understand what ASCII Symbol this is.... Also cause the fact we maybe can include this tricky solution in other spots !

Be so kind and link me the website if you remember to it !
Thanks !
Good Luck !
2020-07-18 17:02
Avatar
Dogepanda
From: Schagen, Netherlands
Posts: 12
Hi,

It was actually a post on www.stackoverflow.com ( https://stackoverflow.com/questions/17978720/invisible-characters-ascii#:~:text=There%20is%20actually%20a%20truly,t%20take%20up%20any%20space. )

Someone posted this:

Number Name HTML Code Appearance
------ -------------------- --------- ----------
U+2000 En Quad   " "
U+2001 Em Quad   " "
U+2002 En Space   " "
U+2003 Em Space   " "
U+2004 Three-Per-Em Space   " "
U+2005 Four-Per-Em Space   " "
U+2006 Six-Per-Em Space   " "
U+2007 Figure Space   " "
U+2008 Punctuation Space   " "
U+2009 Thin Space   " "
U+200A Hair Space   " "
U+200B Zero-Width Space ​ "​"
U+200C Zero Width Non-Joiner ‌ "‌"
U+200D Zero Width Joiner ‍ "‍"
U+200E Left-To-Right Mark ‎ "‎"
U+200F Right-To-Left Mark ‏ "‏"
U+202F Narrow No-Break Space   " "

I tried some of them and not all of them we're working. I used U+2000 and U+2002.
I also send you a mcc file on Discord, might be better

Regards,

Tijmen
2020-07-18 17:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Thanks again! Realy cool. I think so many hours about this and a soluition. But never think this basic and easy way !
Good Luck !
2020-07-19 16:25
icon