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! 

icon
Avatar
franciscoignacio
Posts: 34
Hi MobiFlight community!

I´m looking to fit on 8 digits display the string from DC ELEC_METER of PMDG 737, that is 13 digits long.

6C40 -> 13 STR[13] ELEC_MeterDisplayTop[13] Top line: 3 groups of 4 digits (or symbols) +terminating zero

What I need is put the First group of the string in the 4 left digits of my LCD and the Third group of the sting on the right part (4 digits) of the LCD. The second group of the offset string is always 0000.

With this, I´ll get the DC AMPS and CPS FREQ values represented.

Now, I have the LCD working, but I only get the DC AMPS Value (the first par of the sting) while the rest of the LCD is black, because the information of the third group of the sting is outside the 8 LCD digits.

The same could be applied to the bottom part of ELEC METER with some modifications, because in the bottom part, the 3 groups of the offset string are used for the DC VOLTS/AC AMPS/AC VOLTS.

Thanks!!!
2017-11-27 14:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5648
Supporter
Hi

We talk about this some time ago..... Not find the topic yet.....

I think you got 2 possible ways.....

1. Use Substring Setting.
( If i remmeber right there was a "Bug" .... Not shure if Sebastian solved it already. In the Past you not be able to active "Substring"it when you already set STRING as Type.... Use before INT..... Activate "Transform" Checkbox..... then Change Type into STRING..... Now the Substring should be active..... here you can define the FROM-TO Range you like to read.)
So i think you need 2 Configs.... First Read Number 1-4 Second read Number 9-12

***

2. Working with a self defined "String Starting Point"

The Offset you tell me is 6C40 and include a 13 Byte information ( 12 Byte Data + terminating Zero)
What happend if you Readout Offset 6C48 ??? (This would be 6C40+8 ... So we not read the first 8 Diggits only the last 4 until terminating zero)
So 1. Config read the FULL String.... And is set to Diggit 1-4 ( We simply ignore that the information behind is not shown)
2. Config only Read 6C48 and show the last 4 Numbers now on Diggit 5-8

Please Try Out !
Good Luck !
2017-11-27 15:37
Avatar
franciscoignacio
Posts: 34
Hi pizman82!

Yes it works! Thanks a lot.

The second way runs fine for me. I can´t configure the first "substrings" method properly, but "Strings Starting Point" as you mentioned runs perfect.

It is very easy to configure the DC ELEC METER TOP and BOTTOM display with this way. Selecting the calculated offset as you explained, and creating differents rows for each value and later selecting the digit of the display that show the value, works very fine.

Thanks, thanks, thanks!

Regards!
2017-11-28 00:03
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5648
Supporter
Nice !

The only disadvantage of this methode is that Mobiflight must Readout the String "twice" .
A String is a high Data Transfer and workflow..... But aslong you see no issues (lower speed etc) then all is fine.

Maby i think about that on my next "testing day" then i will doublecheck the Substring logic. Not shure if it is still buggy or you simply use it in wrong way !
Finaly Thank you for your reply... Now i know i must check it again :-)
Good Luck !
2017-11-28 10:09
Avatar
Menticol
Posts: 2
Hello pizman82!

I was reading this question and I suspect I found the aforementioned bug, on version 9.5.0

Let me explain the steps to cause it:

1) After selecting the FSUIPC offset 0x034E, value type = int, size in bytes = 2, mask value with = 0xFFFF I get 128.30 from FSX. So far so good.

I have a 4-digit 7-segment display with a hard-wired "1". So, we need a substring to crop the unnecessary 1 and leave only the 28.30 portion.

2) Switch value type = string and more options = substring from 1 to 3

After executing this step Mobiflight replaces the Flighsim value with the corrupted value 0(p' and the 7-segment display goes blank (only the decimal point remains lit).

Is this the bug you are mentioning?

Thank you very much
2022-09-22 04:48
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5648
Supporter
Hi
At first.... the "bug" i talk about in the older posting is no longer happen. The Topic is 4 Years old!
So by the way.... Please not reopen those old topics.

About your Problem:
You mix up 2 Things.
SubString is only needed for String Offsets and for sure only possible there.
Your reported Offset (034E) is not a String.... Its a Integer. So usage of "String and Substring is not possible and fully wrong here !

About Solution:

You have to do nothing !! Except maybe delete the (for you) unneeded Transform:

Offset 034E ( 2 Byte Integer in BCD Format) include a 4 Number Value for the Frequency ( Like FSX work with)
A Frequency of 123,45 is shown on that Offset as 2345.
So your problem that you not need the leading 1 (in case you hardwire it) is not a problem at all, cause it is not included already!

If your "Output Value" of that Config show 12345 instead of 2345 in that example then i expect you use the "Preset" from Mobiflight.
Here we got a Transform Line "$+10000" to make 12345 out of 2345 ..... Cause 99% of USers not have a hardwire "1".... They have simply a 5 Digit Display.

So Solution:
Simply disable the Transform $+10000 and then you got exactly what your looking for !
Good Luck !
2022-09-22 19:15
Avatar
Menticol
Posts: 2
Bringing the dead back is a very novice mistake, I'm sorry!

I really appreciate you still took the time to write such a complete answer. I'll try it out.

Danke schön! Have a fantastic weekend
[Last edited by Menticol, 2022-09-24 09:42]
2022-09-23 17:39
icon