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
jimmullaney
Posts: 5
Hi,
I am using Jeehell/Mobiflight for my A320 cockpit.

I am trying to design a solution for the MCDUs using arduinos, but need about 150 buttons to do both - which is 3 megas worth.

I got thinking about how MF flight might be able to simulate a button matrix using preconditions. If you reduced the buttons to a 10 x 8 matrix, then you could fit both MCDUs on one mega.

I know at present MF doesn't support button matrix, but wondered if you could fake it using preconditions. I can see that you can set a precondition using Arcaze boards where the actions of one button press depends on the state of another button. Using this, you could probably simulate a button matrix But I don't see how to do this with Arduino. I wondered if it might be possible. I'm not smart enough to figure out how :)

Any thoughts?

J
2018-08-09 03:19
Avatar
paul_max
From: United Kingdom
Posts: 74
Supporter
J

A matrix of N x M buttons typically uses N outputs and M inputs. Sequentially the first output is high for about 20ms; this repeats for all N outputs and starts again.

When each output is high, the M inputs are read to see if any button is pressed. So rows/columns are scanned in a continuous loop.

For MF a button matrix is impossible, unless it is added to the software by developers.


Have you seen the OpenCockpits USB Keys card? It supports 88 buttons in a matrix, each sends a keyboard character via USB to the simulator.

See:
.http://www.737ng.co.uk/opencockpits.htm
The sim builder uses FSUIPC to assign a command to each key.

Cheers Paul
2018-08-09 09:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Cool that a other user already "see" this little fact like me.

You awnser your question yourself ! That "was" maby possible with a Arcaze but not with MEGA. On Mega there is no feature in MF to "see" the current Button status and to work with it in a precondition.

To make this as a Improvisional solution you need to work with custom Offsets.... Like If a Row 1 Button is pushed it must write a Offset to "TRUE" Then you need for example for every Button 8 Configs that work if Corespondending Row/Line Combo is True.

I think Thats Possible in a strange way.... But not profitable ( pretty shure this is so compelx that it will not work smothe cause loop time of MF is to long to read/Write that )

Summary.... Number of Megas are not Limited.... Simply use 3 instead of 1 . If you realy like to do it with matrix i recommend to work with a simple Keyboard Controller or something simmular ( So external to MF).
Good Luck !
2018-08-22 07:19
Avatar
ThingWizard
Posts: 2
Just going to chime in here to this old thread, the matrix is really something that would be beneficial for the CDU. Simvim does it, using multiplexers and arduino, so I think it ought to be tecnically possible given the hardware is the same. I'm struggling myself right now trying to figure out a smart way of interfacing my CDU using MF, I'm glad MF now supports multiplexers but a bit sad to find that the matrix function that I was hoping to use does not seem to be available. I looked at preconditions but that seems to not let me choose another button as a preciondition...
2023-12-26 22:16
icon