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
Kaellis
Posts: 10
I am working on a COM2 / NAV2 radio to emulate the ones in the JF Piper Arrow.
One of the knobs is a volume control that I want to operate using a couple of 10k pots I have.

I have the pot connected to the arduino Nano and created a device for the NAV2 volume in mobiflight using the Analog Input.
The dataref preset in the config file is correct and the pin connections seem to be correct. (GND, VCC for the outer pot pins - A4 for the wiper pin)

While running the devices in mobiflight, the change in the resistance appears in the log window as I turn the knob. (Value changes from 14 to 1023 as the knob is rotated)
However, it does not change the dataref value in the Xplane aircraft. A value that changes from 0 to 1 in the dataref window when I turn the knob in the sim aircraft with my mouse.

As I was looking through the forums for some help I ran across the statement below in a thread from Oct. 2020...

Is this true and is the fact that my pot is not affecting the dataref in Xplane a result of mobiflight not supporting potentiometers?
Or am I missing something in my mobiflight config?


"NO.... Nobody can explane you cause Mobiflight simply NOT support Potentiometers.... not Now and also not in the near future !
This topic occure from a "own" project of a user.... If he implement this for his personal usage you can call him.
We talked a lot about that thematic.... and there was good ideas. But finaly we came to the result that Potis are NOT a option for us at the moment."
[Last edited by Kaellis, 2023-04-01 19:30]
2023-04-01 18:55
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconKaellis:

not Now and also not in the near future !



LOL. Already Mr James Bond know "Never say never".
So i´m sorry for this bad comment years ago.
That time our policy was totaly we not want Potis in MF.... But so many people request for them that we finally decide to put them in.
So.... Yes Mobiflight meanwhile support Potis (Direct on Arduino and also via HID Devices) and Yes... You can controll Xplane with them.


About your Problem:
You already did the needed research process.... Cause you confirm the Logging show Values from the Pot. Means its detected and setup 100% correct.
So Hardware Side and MF Device side is working already.

Your Problem now is that you use the wrong dataref or you choose for the right dataref but not use the coorect Formula within Mobiflight Input Value field.

I expect maybe you got the Dataref for ON/OFF of the Radio.
Often those radios have a Poti with a latching Endstop. Means if it is on the most Left position there is a switch to define ON/OFF and the other way it is a Poti to controll the Volume stepless.
So if my idea is right maybe the dataref is for the ON/OFF thing and there is another one that controll the Volume.
You pretty sure need a dataref that have a range of 0-xxx e.g. 0-100 for Volume.

Best way to handle this is join our Discord.
There are lots of Xplane Users who can help you better directly .
Good Luck !
2023-04-05 18:05
Avatar
Kaellis
Posts: 10
I was given the solution on Discord by Jaime Leon.
2023-04-06 00:23
icon