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
majorswitcher
Posts: 2
Hi,
I’m making a prototype using 1 dual rotary encoder incl switch, and 2 buttons. The buttons control whether the encoder changes com1 or nav1.

The input actions on the buttons set a MobiFlightVariable, EncoderFunction, to a String “COM1” or “NAV1”.
I have 4 encoder input configs: outer and inner ring, with precondition set the mobiflight variable EncoderFunction = “COM1” and the same for NAV1

This works as expected!

But, 2 issues:
1) when I turn the encoder before I have set the variable with a button press, MFConnect crashes.
2) input config for encoder button, to switch active frequency: when I add the same precondition checking EncoderFunction = “COM1”, Run MFC the software crashes again.

Any idea why this happens?
Could it have something todo with using a Uno (Mega pro mini is ordered)
2023-05-31 07:48
Avatar
majorswitcher
Posts: 2
I found the issue! Posting here for future reference.

On Run of MFConnect, all buttons are Released. This made the Input Config for my Encoder switch run, but that has a precondition on the varialbe EncoderFunction.
Because no button was pressed yet, the variable wasn't set yet so it didn't exist. And a precondition on a variable that is undefined causes a crash.

I fixed it by adding the same variable set action on my COM1 button Release as on Press. This will set the variable on script run to COM1, so that is now my default starting value.
No more crashes :) prototype working, onto a button box with many many functions !

Loving this new dimension to flight simming :)
2023-05-31 09:35
icon