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
Wardie
Posts: 10
Please forgive me, I'm a newbie and need advice! :confused: I am trying to setup the Landing Alt and Flight Alt on the PMDG737 using P3Dv5. The digits are displaying perfectly but I am struggling to get the rotary encoders working correctly. When I turn them I have to go through about five "clicks" before a value changes and this is not constant, sometimes I have to turn a complete rotation to get the digits to increase by 500 feet. Also, if I turn the encoder anti-clockwise the digits keep increasing and do not decrease as they should. I am using the PMDG-Event ID EVT_OH_PRESS_FLT_ALT_KNOB Event ID 69850 as well as the one for the Landing ALT. I am using Custom Parameter 0 for the "On Left" and "2 for the "On Right". I am sure there is something basic I'm missing, it seems the Arduino Mega is wired up correctly, 5V and Ground where they should be, and the other three wires to 2/3/4 inputs. Up until now I have used SIOC and Opencockpit cards, I'm new with Arduino/Mobiflight! Any help will be really appreciated!
2020-10-15 17:27
Avatar
Wardie
Posts: 10
Further to what I have said I have just found if I turn the encoder to the left 1 click it increases 500 feet, then to the right one click it increases 500 feet, then to the left again 1 click it increases another 500 feet and so on.......... I don't understand what's happening but I'm sure that's good news so far?
2020-10-15 17:34
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
Welcome to Mobiflight !

One clear issue.... Maybe two !

1. Wrong Parameter.
The Custom Parameters (0,1,2,3 and so on) are used ONLY for Latching switches and Multiposition Rotary switches. Latching ON/OFF got 0=Off and 1=On.
Multiposition Switches mostly work from UP to DOWN or from LEFT to RIGHT.... Starting with 0.
For example the Engine Start Switch have 0 for GND 1 for OFF 2 for CONT and 3 for FLT.
The Momentary Buttons use as parameter always a LEFTCLICK .... The Number can be found in the PMDG EventID List... 536870912 in that case

FOR ENCODERS we not have a fixed position.... So Parameters like 0,1,2, will not work !
Here we use Mousewheel UP and DOWN parameters.... UP 16348 .... DOWN 8192

EDIT: In PMDG"u" and in some older ones we can also use LEft and Rightclick for Encoders. This increase the change of value by factor 5x. Fast Turn e.g.!

****
2. Wrong wirework maybe. A Encoder got 3 Lines normaly.... A , B , and GRD .... Some Encoders also use 5v so 4 pins overall.
If your encoder got 5 Pins ( Pretty sure a KY040 Encoder) then the 5th Pin is for the Push Button on the Encoder.
Please get sure you not wire it wrong way. If you say you have 3 Pins (2 3 4) then confirm you use the 2 Channles A B correctly for the Encoder and the third Pin is set as a BUTTON !
Good Luck !
2020-10-15 20:50
Avatar
Wardie
Posts: 10
Hi Pizman82, thanks a million for the welcome and for your input! I am away tomorrow so I will carry on troubleshooting on Saturday and let you know how I get on. Thank you for pointing me in the right direction! :)
2020-10-15 21:10
Avatar
Wardie
Posts: 10
Hi Pizman, Thank you, Thank you, Thank you! :thumbup:

I changed the parameters and it is all working beautifully! Thank you for your quick and informative support, you are a star!

Have a super weekend! :)
2020-10-16 19:13
Avatar
volavue
From: SEILLONS SOURCE D'ARGENS, France
Posts: 13
Hello Pizman

could you help me . I have a problem with trim encoder for cokpit C172 MS2020 . I am using offset 0BC0 - Value type int - Size in Bytes 2 mask value FFFF and I set the value 1200 to have a correct number of turn with my virtual wheel. On left I put $ -1200 and on right I put $ +1200 but the wheel don't change the sense of rotation.
My encoders is HKT 1062 KY 040 with 5 pin ; I connect CLK on pin 7 and DT on pin 8 and the GRD to ground.

What is wrong . please help me
JJZ
2021-11-09 18:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

At first.... Check if Problem is located in Software or Hardware....

Just for testing.... Enable the "logging Mode" in Mobiflight Settings Tab! Typ: DEBUG
(Note just for testing.... Logging Mode slow down the system.... So not keep it activa all the time).

If there is a Left/Rigth Message in the Logging when turn the encoder, then it is detected.
If not ( i expect) then there is a electrical Issue !

Expected Problem:
iconvolavue:


My encoders is HKT 1062 KY 040 with 5 pin ; I connect CLK on pin 7 and DT on pin 8 and the GRD to ground.



KY40 Encoders are technical not perfect for Mobiflight.... We normaly work with Standard 3 Pin Encoders.
They will also work! BUT you need to also connect the 5V Pin to the Mega ! ( In case KY40 work in a other system and additonal need 5V ...: Thats why we not official recommend them)

Solution:

1. Check if Hardware is working
2. Rethink input system..... FSUIPC is outdated.... Yes it workes, but our new WASM tool ( Simconnect Inputs FS2020) work way better in the FS2020 instead of oldschool FSUIPC!
( Point 2 is not the nature of problem! But i recommend to go the "new" way !)
Good Luck !
2021-11-10 00:49
icon