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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
jc
Posts: 22
Hi , I have three max 7219 moduals daisy chained and am having some trouble with radio frequency displaying wrong numbers on com1 standby and Nav1 Active both of which use display1/2 and 2/3 respectively .All have left padding and have transform $+10000 enabled. the strange thing is ,is that when I switch the standby frequency to active then it shows the correct numbers ( maybe because the number is being displayed on the same display ) and the now standby frequency displays the wrong number . I am in the test phase of building a radio stack and in a previous test had all the same settings and it worked fine . Am I overlooking something . I would appreciate any insight .
2019-11-09 09:13
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
Hi

Two Possible issues: Wrong Offset Logic .... OR ..... Wrong Config Setting for combine Displaymodules

If your Display basicly looks good and values make sense ( Whatver are wrong frequencys) then its pretty sure point 1 ......
If the Values that are "split" over two Displays are completly wrong and not logical then your problem is the Config setting.


1. Wrong Offset.
Do you use a AddOn Aircraft ?
Some AddOns work with "internal" Data for COM and NAV ..... The Active Frequency is normaly ALWAYS the same as we read from the Standard Offsets..... Cause the Sim must know the current frequency to handle AI ATC or IFR Nav Data to the Aircraft..... So the AddOns normaly simply "copy" the Active Value to the FSX/P3D Standard Offets.
The "Standby" Value is sometimes different ..... Here some AddOns use a "internal" value that mostly can not be read .
Result: You pretty sure read for Active and Stby the Standard Offsets..... So you get the current Frequencys that are set in P3D/FSX at the moment. .... If you now Change frequency in a AddOn like PMDG then the Stby Value is Different to the Value on the Display...... Cause the Stby in PMDG is the internal Value and NOT the FSX/P3D Stby Data.

To Solve this.....
Use a AddOn that provide all Data ( it´s Active and Stby Value ) on OWN Offsets.
OR
Use for Homecockpit a FSX/P3D ONLY Radio..... So not work with AddON Inputs ..... Simply Read/Write completly the standard Stuff. In That case the Displays in AddOn show different data..... But we not care about cause we have our OWN System now and finaly th Active Frequency is still the same.

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

2. Wrong Display Configs.

iconjc:

I have three max 7219 moduals daisy chained and am having some trouble with radio frequency displaying wrong numbers on com1 standby and Nav1 Active both of which use display1/2 and 2/3 respectively



You have 3 Max7219 Chips .... Each can have 8 Diggits . 3x8=24
You show 4 Different Things ( Com1 Act ... Com1 Stb ... Nav1 Act .... Nav1 Stb ) .... Each got 5 Digits . 4x5 = 20 .

That means you "split" Displays ..... Pretty sure COM1 ACT is set on Max A ..... NAV1 STby is on Max C ..... And the Com1 Stby is split ! Some digits on Max A and the other on Max B ..... same with NAV1 Active.... Here some Digits stay on Max B and the others on Max C.
THIS can work but need a verry accurate and correct Config Logic. You need for the splitted Displays each a good transform logic.... So The correct Data is on the correct position.


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

Summary.... Find out whats the problem..... Then we can find a solution.
Good Luck !
2019-11-09 15:58
Avatar
jc
Posts: 22
Thanks for your reply. I doing this as simple as possible and using
the msfs default cessna radio stack. The setup of the max modules you described is correct. I noticed, for example the values displaying the 3 last digits of the com1 standby frequency on the first 3 digits on the max B were incorrect ,so I set a transform of ( $-10000 ) and that semed to have fixed it. But then I went on to do the same for nav/con 2 and in this case it didn't work. I'm completely baffled to say the least. I have got good readings which suggests that all my soldering, wiring and configuration are correct .
2019-11-10 05:48
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
iconjc:

I doing this as simple as possible



The Question is.... WHAT should be simple......
Your right. With your technic the building progress is more easy cause you just glue 3 Tubes together and wire 3x5 Lines from A to B.
BUT the Configs are more difficult if you like to "share" it over 2 Displays.

I personaly recommend a easy system.....
Every Display is connected to its OWN MaxChip !
So if you need a 3 Digit Display simply let the other 5 possible Pins empty and wire only THIS Display to the Maxchip.
Benefit: Every Output got its OWN Device with correct Name..... If something gets broke only THIS part is Out of Order ..... Every Config is 100% Logical.

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

To solve your problems with your shared Displays.....

For the LEFT Part of the split Displays you not need a change.....
The Raw Data for frequencys are 4 Digits ( Without Leading 1) .... So A Freq of 123,45 is in Offset 2345 .
You use Transform $+10000 .... So 2345 change to 12345 .
If you use now only the last 3 Diggits of Max 1 the config works, too. Cause the Output Config simply fill Diggits from LEFT to RIGHT. Means it write 123 on your existing Diggits and simply "ignore" 45 in case there are no more Digits left to show this.

For the RIGHT Part on the next Tube you need a "MODULO" function.
Modulo (% Symbol) say..... Sub X form a Value as often as possible ...... and show us the remain value if no full subtraction is possible.
For example 120%50 means 120-50=70 .... 70-50=20 .... 20-50= NOT POSSIBLE ...... So Result is "20"

So if you like to show for example the last 2 diggits of a Freqency on the "next" Max Chip then you need a Config that read the FULL Value..... ( $+10000 is not needed cause we not like to show the first part ) ..... In upper example for 123.45 raw value is 2345 ..... You need only "45" so solution is a transform "$%100"
In that example 2345%100 make 23 times minus 100 and then the remaining value is 45 ..... And thats exactly what you need !
Good Luck !
2019-11-10 15:51
Avatar
jc
Posts: 22
Thank's again. Definitely a question of luck at this stage
2019-11-10 18:59
Avatar
jc
Posts: 22
Well you should see the smile on my face,
your a life saver, you're math works a treat. Definitely easier than all the soldering and wiring it would take to use individual max chips. Although it makes sense in the long term. Thanks yet again.
2019-11-10 19:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
No Magic.... Just math ! :P

There exist two kind of cockpit Builders..... Some want a programming part as easy as possible but have no problems to solder 1000 wires and design 10 hours for a single display on there 3D Printer ...... The others want as less construction work as possible but have no problem to write 100 pages codelines and scripts.
Do what you like more.

Whatever..... If you got the first experience and startup for jump to next level you will build a cockpit that looks 1:1 simmular to the original one..... And THEN you can not use a 8 Digit Display..... Cause you look for the same 5 Digit Display in same size like in real Aircraft..... But stay calm.... It takes some days until you reach this point !
Good Luck !
2019-11-11 15:49
Avatar
jc
Posts: 22
It also has to some degree alot to do with ones knowledge base and in my particular case when we're talking about coding, well I'm just starting out. And I might add its a steep learning curve. Having said that maybe you can help me a little more. You see now that all the nav/com values are displaying correctly I have moved on to adf . On the sim display it shows 5 digit with a decimal point before the last , the first is a 0 and that doesn't change. In mobiflight I have set 5 digits but it shows me for example 4640.0 instead of 0464.1 that I set on the simulator radio , I've tried to figure out the math to correct this error but to no avail. Again besides coding skills what am I missed, much appreciated.
2019-11-11 19:32
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
No Prob....

Quote from the FSUIPC Offset List ......
iconQuote:

0284 2 ADF1 Standby Frequency: main 3 digits, in Binary Coded Decimal. A frequency of 1234.5 will have 0x0234 here and 0x0105 in offset 0286.

0286 2 Extended ADF1 Standby Frequency: the high byte contains the 1000’s digit and the low byte the fraction, so, for a frequency of 1234.5 this offset will contain 0x0105.




So if you Read 0284 2 Byte BCD ..... then your example frequency of 0464,1 have there a Value of "464" ......
And if you show that 3 Digit Value on a 5 Diggit Display then it will show 4640,0 ...... It simply fill up to the right with Zeros..... And have the decimal on the position you choose.

To get a ADF working you need TWO Configs.

Offset 0284 is for the "inner" 3 Digits.... Like -xxx- ....... Offset 0286 is for the outer Digits like x---x .
The first can be used directly...... The second need a little "math" .....

if you have a frequency below 1000 then this offset have a value of 0-9 ( Only the decimal ) .
If you have a value above 1000 it have a Value of 100-109 ...... Here the Zero between is a Problem.
Solution is.... Enable COMPARE Tab and say...... IF Value >10 ( Means the 1000 is active) THEN $-90 ELSE $
Then all values from 100-109 are changed to 10-19 .
Summary.... Config 1 show Value on the inner digits..... And Config 2 show the firt and last digit.

ALTERNATE: You can also work with THREE Configs..... Then You read Offset 0286 by two 1 BYte Configs.... Then the compare is not needed cause every digit got own config.
Also possible but more work !


NOTE: I not remember 100% what Left Padding is need. Please try out..... I Think it was Left Padding YES mit ZERO.
Good Luck !
2019-11-11 21:58
Avatar
jc
Posts: 22
Thanks again Pizmon82. I'm doing my best to get my head around that, like I said " a steep learning curve ". On to the mcp Altitude, I read in one of your posts that it is NOT possible to span the 5 digit value over 2 separate max module's. Is that correct, absolutely no way?.
2019-11-13 11:06
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
Maby i said this in the early time i startup with mobiflight ( 3-4 Years ago ) and was also on beginning of the "learning curve"

Normaly a split over 2 Displays is possible..... You just need to know WHAT is the raw value look like..... And HOW the Display should look like.
The solution then is just a simple logic or our "magical" Math :blush:

In Case i not need this ( Cause i build displays always on a single Max) i not test out.

Here pretty sure the Right Part ist more easy .....
For example in B737 as i remember the MCP Alt have 100 Steps..... Means Whatever you set lowest value "100" or biggest like "44000" .... The last Two numbers are always Zero.
So if your "Right" Part have only 2 Digits then you can simply say here "always 00" cause it can never have a other state.
If you use 3 Digits to the Right a Modulo like above is good..... $%1000 result in a 3 Digit Output only showing the xx100 Part.

The "Left" Part here is more Difficult. HEre i must think about and do testings..... Cause here it work fine for Altitudes above 10000..... But get a LeftPadding issue when you have a Altitude below 9900 and another one below 900 ..... Not sure how to solve this. Maby i need to test.
Good Luck !
2019-11-13 12:40
Avatar
jc
Posts: 22
Precisely, I have only the 5th digit on the right (second modual ) and like you said that will always be zero. The left side must have left padding enabled , but I simply can't find a way to do anything in compare to move a decimal one space to the right. The mind boggles.
2019-11-13 18:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
What about a simple Transform $/10 ?

I not test it now cause i´m not at home. But.....

With Left Padding YES Typ Space the follow should happen:

If Value is Above 10.000 we would basicly not need a formula....
17700 must show on our Left Display 1770 ..... this worke cause it simply ignore the last diggit in case of missing device.
With our formula we transform 17700 to 1770 ($/10) so it is the same.

If Value is between 9900 and 1000 without formula we got a issue.
Here 9900 must show on LEft Display "_990" ( _=Space) ..... But without formula we got 9900 on it.
Also here $/10 looks good..... 9900/100= 990 ...... With Left Padding Space this gonna be "_990"

If Value is below 900 its the same.
We need on Display "_ _ 90 "
Without Formula we will get.... _ 900 or 0900 or 9000 whatever Left Padding Option is choose.
With $/10 our Raw Value change from 900 to 90 ..... And that is "_ _ 90" with left Padding Space.


Looks good. Please try out !
Good Luck !
2019-11-13 19:54
Avatar
jc
Posts: 22
I'm afraid no joy with that . I entered ( $/10) in the transform field and I got only false readings. You see initially when I set the AP altitude valve it automatically filled in ( $*3.28084/65536) in the transform field and that only gave false readings. So I checked out the mobiflight tutorial and noticed when Stephan was setting up the altitude he had ($*5.0062E-05) in the transform field. So that's what I did and got all correct readings. So really I don't know where to go from here, what do you think?
2019-11-14 16:53
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2738
Supporter
Thats both the SAME

Sebastians way is something like (X * A) / B ...... Stephans way is X * (A / B )

Dollar is the RAW Value from FSUIPC.
Here you can read....
iconQuote:

07D4 4 Autopilot altitude value, as metres*65536



So its the altitude in meters multiplyed with 65536. To get the needed Feets we must multiply the value by the "Meter-Feet Factor"
(1---> 3,28084 ) AND we must divide through the 65536. .... And thats Sebastians Formula $*3.28084/65536

Stephan does simply shorted the formular to one factor ...... He say $ * (3.28084/65536) ..... And that result in $* 5.0062E-05

*******

To include now the needed $/10 i recommend to you ..... you must simply include this in formula.

For Sebastians way you need.... $*3.28084/65536/10
For Stephans way it should be $* 5.0062E-06 ( The increase of E-05 to E-06) is same like x/10)

Try out !
Good Luck !
2019-11-14 17:52
Go to page 1Go to page 012Go to page 2Go to page 2