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
einclick
From: Stuttgart, Germany
Posts: 9
Supporter
I'm using a LCD 2004 with an I2C Adpter. In the display i'd like to show NAV1 + NAV 2 and COM 1 + COM 2 both with their corresponding standby frequencies.

Currently i'm using this form in the display:
iconCode:
NAV $$$.$$   ###.##
   [///.//] [§§§.§§]
COM !!!.!!!  ???.???
   [@@@.@@@]


In the config wizard i use 6 fields as variables with their reference values but currently i'm missing one for the standby frequency cof COM2.
Is there a limitation for the config refenences (to 6 fields) or is it possible to extend this fields with at least one additional entry? If not: Is there a workaround that i could add one more variables to be display (maybe by concatenating the standby frequencies in a termporary variable)?

And by the way - thank you for this great piece of software - i have a lot of fun with it :)
2021-12-26 10:45
Avatar
Whiteknuckle157
From: Bayern - Bibertal, Germany
Posts: 50
Hi,

having eight fields would be convenient for this case. I missed them also.
I stitch Mobiflight variables like this (example for Com1):

Com1


Com1 as variable stitched with Com1 Stby (use Com1 as #):


The same goes for Com 2 and the NAV values


Then I use the four COMn/NAVn & COMnStby/NAVnStby variables (which are now combined) for the display.

cheers

Volker
2021-12-28 09:16
Avatar
einclick
From: Stuttgart, Germany
Posts: 9
Supporter
Thanks for the description to that workaround. I also tried this, but sadly in my case that doesn't work :huh: I don't use FSUIPC but tried to do it with the usage of Mobiflight variables with two approaches:
In both cases i used config references to field "Com1 SBY" and "Com2 SBY" e.g.

iconCode:
COM1 value: "124850" assigned to #
COM2 Value: "129430" assigned to %
Expected concatenation result: "124850129430"

  1. Variable type: Number Transformation: #*1000000+% Result: "296077846" (maybe because of max. value for signed ints?)
  2. Variable type: String Substring defined "0" to "11" -> No value returned.

Is there any other solution how to "append" values?
2021-12-28 19:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Guys.

At First....
The Major Idea is known.... And i will once again vote in the ToDo List for a simple "increase" of Variable Number from 6 to 7 ( With $ we then would have the needed 8)
In the Past we not support 4 Liner Displays.... So there was no need for more then 6 Variables.

About your Idea:

The "Combined Numbers" are a way we use in the past, too.
LCD show a Value also splitted....
E.g. a Value of 12345 can be shown like AA: # # BB: # # # .... And result in AA:12 BB: 345
So simply Multiply the first and Add the second is a nice idea... Like Com1: ###,## Com2: ###,##

You also explore the end..... As i know MF internal Values are INT32 DoubleWords ----- Unsigned max 4.294.967.295 or may Signed max 2.147.483.647
Whatever.... Two 6 number values together result in a 12 number Value..... But we only have 10 numbers max (where first is less then 2/4)
So it work in the past with two 5 diggit values ... Cause together its something like 1.234.512.345 so definitly less then 2.147.483.647

Summary: Idea still work BUT its not a solution for the 6 diggit Coms.... Whatever it would work for the still 5 digs of the NAV.


*******************************

SOLUTION:

iconeinclick:

In the config wizard i use 6 fields as variables with their reference values but currently i'm missing one for the standby frequency cof COM2.
Is there a limitation for the config refenences (to 6 fields) or is it possible to extend this fields with at least one additional entry?



In the GUI the limit of 6 Entrys is fixed Hardcoded..... BUT in the Code itself there is no limitation..... Means you can easy add a new Variable ( That is finally not shown in the GUI but that exsit and is useable !!) ..... Only Disadvantage..... In case you not see it in the MF GUI, you need to remember the used Symbol !


How to do:

- Create the Config and use only one Placeholder.... ( The One you will use e.g. as number 7 later)
- Define it and use the final symbol you like to work with.
- SAVE your Config..... and then Open the MCC File with a Text Editor.

FOR EXAMPLE:

iconQuote:

<config guid="d6d09747-2898-41a6-9a37-35859f0e6192">
<active>true</active>
<description>READ Bat Status</description>
<settings msdata:InstanceType="MobiFlight.OutputConfigItem, MFConnector, Version=7.10.0.0, Culture=neutral, PublicKeyToken=null" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<source type="FSUIPC" offset="0x648A" offsetType="Integer" size="1" mask="0x00FF" bcdMode="False" />
<comparison active="True" value="" operand="=" ifValue="1" elseValue="0" />
<display type="" serial="-" trigger="normal" pin="" pinBrightness="255" />
<preconditions />
<transformation active="False" expression="$" substrStart="0" substrEnd="7" />
<configrefs>
<configref active="True" ref="7e1b25e9-1bee-4740-a7b8-18a9b20234b3" placeholder="X" />
</configrefs>
</settings>
</config>



Here you now copy the needed Line into your dashboard or a empty Text file!

- Now open MF again and your File and create now the real 6 Variables you like to use.....
- Save it Again. and open the File with a Text Editor again.
- You see now the 6 correct entrys. And you finally Copy Paste the "old line" you backup before on the End.


iconQuote:

<config guid="d6d09747-2898-41a6-9a37-35859f0e6192">
<active>true</active>
<description>READ Bat Status</description>
<settings msdata:InstanceType="MobiFlight.OutputConfigItem, MFConnector, Version=7.10.0.0, Culture=neutral, PublicKeyToken=null" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<source type="FSUIPC" offset="0x648A" offsetType="Integer" size="1" mask="0x00FF" bcdMode="False" />
<comparison active="True" value="" operand="=" ifValue="1" elseValue="0" />
<display type="" serial="-" trigger="normal" pin="" pinBrightness="255" />
<preconditions />
<transformation active="False" expression="$" substrStart="0" substrEnd="7" />
<configrefs>
<configref active="True" ref="49394ad6-1215-4798-bb1a-fae0f446d7f2" placeholder="A" />
<configref active="True" ref="d4a320f6-2bde-44c0-bafc-34a465d5c6a3" placeholder="C" />
<configref active="True" ref="3ae2f14e-26cc-46f6-8ada-ff96ceb8af7a" placeholder="D" />
<configref active="True" ref="c4a66210-2e03-4173-aa3d-8f0d3410934f" placeholder="E" />
<configref active="True" ref="30e34a6d-d95d-4637-b7c5-14937be77f6b" placeholder="F" />
<configref active="True" ref="c4a66210-2e03-4173-aa3d-8f0d3410934f" placeholder="G" />
<configref active="True" ref="7e1b25e9-1bee-4740-a7b8-18a9b20234b3" placeholder="X" />
</configrefs>
</settings>
</config>



Result: The MCC File include now 7 Lines.... the GUI will only show 6.... BUT All 7 are available and the used symbols work fine in Formulas and LCD.
[Last edited by pizman82, 2021-12-29 19:30]
Good Luck !
2021-12-29 19:22
Avatar
einclick
From: Stuttgart, Germany
Posts: 9
Supporter
Thanks a lot for the upvote for the ToDo list :thumbup: and of course for your detailed description.

In fact your workaround is more like a "hidden" feature because when you insert an extra reference field with the guid in the XML-config this WILL be displayed in a new line in the GUI of Mobiflight :w00t: . You can even add more entries (more than 8 will not be visible because there is no scrollbar and the Config-Wizard can't be resized).

All in all this is a very good solution! Kudos go to you and Whiteknuckle157 for your helpfulness and of course to Sebastian for this great piece of software!
2021-12-30 15:25
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconeinclick:


In fact your workaround is more like a "hidden" feature because when you insert an extra reference field with the guid in the XML-config this WILL be displayed in a new line in the GUI of Mobiflight :w00t: . You can even add more entries (more than 8 will not be visible because there is no scrollbar and the Config-Wizard can't be resized).



Thats New to me.

When i test this and figure out this "hidden feature" there was NO additional Entry.... May Seb still start to prpare the GUI for a future 7.th or 8.th Variable.


By the way.... what i not remember for now :

Lets say you add 3 more....
I´m not sure if the "additional" entrys are not shown in the GUI
OR
If the former entry is overwritten.
So it is possible that there is shown 1-2-3-4-5-6-7-8- and 9 is invisible OR it is shown 2-3-4-5-6-7-8-9 and "1" is invisible.

No mater if we have 6 or 8 in GUI..... This Problem occure if we overdrive the limit by hand !
Good Luck !
2021-12-30 17:31
icon