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
missamo80
Posts: 32
I've got PCBs being manufactured right now to replicate the Cessna 172 radio stack. I know there are other designs floating out there but I wanted to make my own. I really should have waited for the LEDs to arrive from China to do one last test of the schematic but with a Chinese holiday coming I had to get the boards ordered.

Today the 5-digit LED displays arrived from China so I wired one up on a breadboard with a MAX7219 according to the schematic I used to make the PCB.

Good news: they work! I get digits! Bad news: connecting DIG_0 to digit 1 of the LED, DIG_1 to digit 2 of the LED, etc. results in the numbers displayed backwards when testing. I get "54.321" instead of "123.45". :confused: :cry: :scared:

Is there a way to have Mobiflight flip the digits so they get sent out the other way around?
[Last edited by missamo80, 2020-09-30 01:29]
2020-09-30 01:08
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi,

the solution is quite simple:
swap the cathodes of your digits. Swap #5 with #1, #4 with #2. #3 let untouched.
After swapping #5 with #1 you'll get 14.325, after swapping #4 and #2 you'll have 1234.5.
Now go to the display setup and set the decimal point again on digit 3 ang you habe 123.45 - ready.
Grüße,
Stephan (Time: UTC+2)
2020-09-30 11:37
Avatar
missamo80
Posts: 32
Unfortunately the PCBs are already manufactured with the cathodes connected in the reverse order. Swapping them would mean manufacturing another 5 and waiting about a month for delivery.

Is there any way to flip the order of the digits in software instead? Some sort of "reverse display output" setting when configuring the 7 segment display in settings?
2020-09-30 13:40
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Your the 3rd user who make this misstake. We realy need to think about a better anouncement. This is not a Mobiflight fault basicly ..... This is the way how Max7219 Tubes work. That tubes are reversed.... And Sebastian build the Softwareto handle that tubes ( 99% of users work with them .... whatever with solder diggits or with self build wired displays.... But nearly ALL use that Tubes instead of raw max chips that would be not reversed ) .

Solution:
Technical Sebastian be able to reverse this in the code.... And in theory he can implement a Option field in the UI like "Invert Pins" ..... But i not think he like to do. Basic Policy.... Mobiflight not include elements that are need for only 1% of Users or less. Cause for the other 99% this is not needed or finaly confusing !

So what can you do....
- Reoder the PCB would be the perfect way.... But expensive and a delay.
- You could rework Mobiflight by hand if you can Programm..... The master Code is available free (open source) on Bitbucket.
- You could rework the PCB yourself..... For example Desolder the MaxChips or Displays and build a little "addapter" that is solder on the PCB and the element is solder into it. This adapter simply must change the Cathode Lines in the sequence you need...... For example a self build little Breadboard with some wires and Pins and Connectors on the two sides.

And finaly what you like to hear..... A Formula !
Yes it should be possible to reverse the value by math.... But i not remember how to do this. Ideas are welcome.
I would know a way to split the Single Numbers and simply set 5 Configs ( one for each number)..... But thats to difficult i think.
So we need a Math Formula that turn 654321 into 123456
Good Luck !
2020-09-30 14:02
Avatar
missamo80
Posts: 32
iconQuote:

You could rework Mobiflight by hand if you can Programm..... The master Code is available free (open source) on Bitbucket.



I'm happy to do that, can definitely program and I think Mobiflight is written in C#? Also glad to hear that it's the tubes that are backwards and not me :D

Let me look at the code and see what I can come up with. Would you guys be open to the contribution back to the software if I figure it out?
2020-09-30 14:17
Avatar
missamo80
Posts: 32
I took a peek at the code and it looks like Sebastian even had this implemented once. MobiFlightLedModules.cs:67 is:

iconQuote:

//value = new string(value.ToCharArray().Reverse().ToArray());



It's just commented out :) I can/will uncomment this and give it a try. Sebastian can I officially request that an option be added to the 7 segment display options dialog to enable this line of code? Something like "Reverse digit order" as a checkbox, then use that in an if statement around the reverse line that's currently commented out.

Edit: Confirmed that uncommenting the line does the trick. Woo! Wonderful!
[Last edited by missamo80, 2020-09-30 15:20]
2020-09-30 14:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Again.

Please get in Contact to me on Discord ( if you use it) or make a short note in Bitbucket "Request" section. Pretty sure Sebastian is verry interested.
Good Luck !
2020-09-30 19:12
Avatar
missamo80
Posts: 32
Will do! I did get this included all the way through with an option in the UI but am not 100% happy with how I handled backwards compatibility. Will ask in Discord tonight about my approach.
[Last edited by missamo80, 2020-09-30 23:28]
2020-09-30 23:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Talked to Sebastian already. He looking forward to offert this option within the UI .
Maybe it would be usefull if you both talk together. May he can use your already done work for this !

By the way.... I spent 4 hours today to figure out a formula with Stephan. i hoped there is a real Math Tricky part here but i not find it. But we could build a little advanced ( and verry long) formula to invert the numbers in the Transform field. BUT this is not realy a good solution.

So hopefully you both together can implement the "flipping tool" a.s.a.p.
Good Luck !
2020-10-01 01:36
Avatar
missamo80
Posts: 32
Bitbucket request for this: https://bitbucket.org/mobiflight/mobiflightfc/issues/273/support-reversing-digits-in-led-output. I have a branch with the change as well, we can continue the discussion over in Discord.
2020-10-01 04:19
Avatar
EfvonIks
Posts: 9
Supporter
Hi,
I have the same issue with the fliped digits at my PCB. Is it possible to test the Beta with the revers digit function? It would be great and I can also let you know if it is working.
2020-11-30 14:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

I not test it myself already..... But as i know it is STILL included in the newest BETA ! ......

You can use the Beta by enable the "Join Beta Group" Option in the Settings of Mobiflight. After the next Startup the AutoUpdater will check for new Version and also check now for Beta branches. It will offer you to Download 7.10.xx and THAT should already include this Function.
As i know it is a simple checkmark in the Display Tab ( Or in the Options on Creating the Display ..... I not test so you must figure out)
Good Luck !
2020-12-04 16:05
Avatar
EfvonIks
Posts: 9
Supporter
Awesome. Just downloaded the Beta and it works fine with the reverse digit function. :thumbup:
2020-12-04 19:20
icon