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
paul_max
From: United Kingdom
Posts: 74
Supporter
I have 2 encoders, X and Y from different manufacturers. I'm assuming the centre pin is GND, then the left/right pins generate A and B signals.

With one encoder and one 8-digit module showing speed and heading I got these results:

Encoder X: every 4th step of the encoder change the Heading

Encoder Y: almost every step changes the heading. every few seconds a step is skipped randomly.
Watching the Arduino TX LED a signal is sent on every step. Most steps get an RX message back and the heading changes, but some steps do not receive and the heading does not change. It looks like the MobiFlight app on Windows skips random TX events.

Encoder X is almost impossible to use for MCP Heading. Naturally I expect a heading change on every click.
Encoder Y is better, but still some steps are lost.

Ironically encoder Y was cheap, and X was a good quality encoder from Leo Bodnar

I'm using the default 737 on FSX SP2 and MobiFlight version 7.4

What encoder types are supported? Why is there a timing bug in the Windows App?

cheers
Paul

PS I have Visual Studio and a clone of the master code. Where in the code could I debug the app with a breakpoint on TX messages?
2018-01-09 14:14
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi Paul,

basically, you may be right about the pins on an encoder. But there are also encoders, so you should study the datasheet before use to get one set the pin assignment and on the other hand to learn something about the switching behavior and detents.

As you have noticed, encoders have quite different switching behavior. Your X-Encoder has a ratio of 1: 4, so 4 detections for a pulse. The Y-encoder has a behavior of 1: 1, ie one pulse per detent.

Mobiflight is currently unable to compensate for these differences. But that comes with one of the next updates.

If you had learned a bit about this in the forum, you would have found that you are the first to lose data on encoders. But MobiFlight has a logging function (setting debug), which you can activate.
MF will then display all actions of valid configurations on your encoder. As long as you do not spin faster than the system clock, no impulses should be lost;)

So I see no need to evaluate the RX / TX line.

If you allegedly lost data, have you ever checked your wiring? Did you wire on a breadboard or did you solder the connections?

To answer your question about the supported encoder types, I can tell you that all common encoders can be used. There were already users who experimented with optical encoders, but the result is not familiar to me at the moment.

I can not confirm that there is a timing bug with MF. Corresponding information from the users is also not available in this regard. Thus, this problem seems to exist only in this form with you.

I can not tell you where to debug what breakpoint. I am not the developer, only ambitious user.

One more thing about your appearance here: You should not assume MobiFlight from the outset, just because something does not work for you, as you think it should work. Experience shows in 99% of cases that the configuration is faulty, the wiring was not properly done (including missing GND connections) or defective components were used. Also ignorance with preconditions or interpolation and other comprehension questions are part of inquiries.
If you think you have to behave like an ax in the woods here, that's up to you, but it requires a lot of tolerance not to write back in the same way.

Please do not get me wrong, but this forum lives from the fact that users here report their problems, certainly also address possible errors, always with the aim of obtaining satisfactory information, so that the problems can be eliminated. But that also depends on the HOW of the lecture. I do not want to go deeper here now and I hope you do not mind my subtle hint.
Grüße,
Stephan (Time: UTC+2)
2018-01-09 20:56
Avatar
paul_max
From: United Kingdom
Posts: 74
Supporter
Stephan,

Thanks for the good reply. I should have said I'm a software developer, so I'm trained to find and kill all bugs without mercy. :sneaky: :scared:

So if I say something negative, it is simply to improve MobiFlight for the benefit of everyone, especially if the problem could affect many people. I think MobiFlight is an excellent piece of very creative and flexible software. The Open Source feature is great, which means that it can continue to grow forever.

I have good quality encoders from Leo Bodnar, but they only gave a pulse every 4th step (1:4). This confused me as I expected expensive encoders to work ok. I don't want other people to fall into the same trap, so it is important to raise the issue. Then other sim builders will not waste money on expensive encoders that do not work.
I have cheaper encoders that give a pulse almost every step (1:1) but work ok. The other types 1:2 and 1:4 do not work, yet.

-cheers
Paul
2018-01-10 20:05
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

the price of encoders is no indication of the technic.... And a 1/4 Encoder not be "bad" and a 1:1 is not "good" . Both are good if you use the correct code for it.

Specialy the Bodnar Encoders are designed for the Bodnar Boards.... there you can Set a Encoder to direct controll Joystick Buttons.
(For example Bodnar support a special Grey roatry Switch, too that work like a 12 Postion Rotary with only 3 wire i think)

Summary.... Mobiflight is working with 1:1 encoder at the moment.... Sebastian is planning to implement a tool to change this individual to 2 or 4 detents by users choice.
Please wait for that ( Maby some months or longer) OR use 1:1 Encoders finaly.

About Open Source.
We always look for people they like to spent there time in our project.
Please contact sebastian and talk to him. Maby you can support him at this feature.

NOTE: Open Source NOT means you should download the code and rework it for your personal intents...... open Source means you should implement your ideas ( in cooporaton with the puplisher) ... So finaly the next release for ALL users is better like the current one !
Good Luck !
2018-01-13 01:32
icon