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
Ilirio
Posts: 38
Hi,

I've just got some potentiometers and I was triying to make them work as throttle levers. As I have seen, the potentiometer lever position is a value which oscillates between 0 and 16384, so I figure I just have to adapt the 0 to 1024 value returned by the potentiometer travel to that 0 to 16384. However, I was trying to use the MSFS2020-Custom Input as Sebastian suggested at the Youtube video in which he presented the feature, but I couldn't make it work at all. I have two problems here, first one is getting the variable to modify, I saw a lot of them using the developer mode, but none of them seem to do anything (or maybe my statement was incorrect). The second one is that I don't know how to refer to the potentiometer value.

Can anybody help me?
2021-11-26 14:27
Avatar
Ilirio
Posts: 38
Hi,

The post about potentiometers deadzones (https://www.mobiflight.com/forum/topic/6892.html) gave me the clue: I entered in Mobflight Hubhop and searched for Throttle input (potentiometers) and got this:

@ 16.0147 * 0 max 16383 min (>K:THROTTLE1_SET)
@ 16.0147 * 0 max 16383 min (>K:THROTTLE2_SET)
@ 16.0147 * 0 max 16383 min (>K:THROTTLE3_SET)

And it's working. BUT the throttle levers at the simulator have a little oscillation and the maximum position is reached before the slider finishes its travelling. I figure that modifiying those coefficients could help me with the travelling, but whsat could I do to eliminate that oscillation of the lever in sim?

And another question, is there any guide to the Custom Inputs syntaxis? It seems to be very powerful but no idea how it works
2021-11-28 13:55
Avatar
Xanth3r
From: Johannesburg, South Africa
Posts: 2
Hi Ilirio,

I'm afraid I can't assist with your oscillation issue and I'm still trying to work out the deadzone thing but I used this guide to help me understand MF syntax a bit better (https://www.mobiflight.com/en/tutorials/community-guides/expression-syntax-guide.html), worth a read and maybe it can assist you
2021-11-28 16:29
Avatar
Ilirio
Posts: 38
Hi Xanth3r,

Thank you for your answer, I checked the link you mentioned but it didn't referred to the new Custom Input mode, or at least that seemed to me, because I didn't see anything like the syntax I copied from hubhop.

So I figure I will soften the oscillation problem by tweaking the multiplying factor, but I would like to have some more syntax reference in order to be able to apply more complex modifications.
2021-11-29 13:34
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi guys

Attention ! ;) ;) ;) ;)

You talk about TWO different Syntax!!

The HubHop and all the FS2020 Events stuff is code that is based on the WASM tool and the API from FS2020.

The Guide you linked ( Written by Stephan) is based on the NCalc Expressions.... We Use "inside" of Mobiflight !
E.g. used in transform Field and Compare.

So not mix it up..... TWO fully different Things Lots of Syntax is identical.... But not all !
Good Luck !
2021-12-02 23:38
Avatar
Ilirio
Posts: 38
Thanks for the clarification @pizman82, so for WASM syntax should I google that (WASM tool syntax)?


Going back to my potentiometers today I did an interesting finding. I connectad my Arduino, started the sim, and my slide potentiometers worked perfectly (no oscillation) without doing anything (I was planning to add some capacitors to filter the possible high frequency components, but I hadn't done it yet). I was very happy but then I realized that the 7-segment I used for displaying NAV freq. was off). So I stopped Mobiflight, reset the Arduino and run again the Mobiflight. And there tjey were, both my NAV freq on the 7-segment and the oscillation in the throttle levers driven by my potentiometers.... and also Mobiflght wasn't responding. As I suspected that the oscillation may be related to the 7-segment I removed the power and the oscillation ended.

So I'm starting to think that my issue is related to powering somehow. My three potentiometers, 4 rotery encoders, 1 LCD display and the 7-segment are connected to the same VCC and GND pins at the arduino, may be to much demanded current or a coupling problem?
2021-12-03 23:20
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi,

have you tried an external power supply? You can also add a 10-100µF capacitor directly to the 7-segment board and try soldering a 100nF capacitor directly to Vcc and GND of the potentiometer. The value can vary, so try a little with values between 200 and 10 nF.
Please note that the Mega with its components can draw a maximum of 500mA current from the USB interface (possibly measure)
Grüße,
Stephan (Time: UTC+2)
2021-12-04 01:11
Avatar
apachebcn
Posts: 3
I'm sorry, I'm not sure I understand.
If your problem is flickering or flickering on 7-segment displays, and you have some of them on the serial connection, you should know that there is a bug with this hardware.
These screens have a diode on the vcc-out pin, and therefore makes a small voltage drop.
When one of them does not receive sufficient voltage, it is not functioning correctly and can even affect all of them due to clock desynchronization.
The solution is to solder a wire between vcc-in and vcc-out, to nullify the effect of this diode.
I hope it is helpful to you.

iconIlirio:

Thanks for the clarification @pizman82, so for WASM syntax should I google that (WASM tool syntax)?


Going back to my potentiometers today I did an interesting finding. I connectad my Arduino, started the sim, and my slide potentiometers worked perfectly (no oscillation) without doing anything (I was planning to add some capacitors to filter the possible high frequency components, but I hadn't done it yet). I was very happy but then I realized that the 7-segment I used for displaying NAV freq. was off). So I stopped Mobiflight, reset the Arduino and run again the Mobiflight. And there tjey were, both my NAV freq on the 7-segment and the oscillation in the throttle levers driven by my potentiometers.... and also Mobiflght wasn't responding. As I suspected that the oscillation may be related to the 7-segment I removed the power and the oscillation ended.

So I'm starting to think that my issue is related to powering somehow. My three potentiometers, 4 rotery encoders, 1 LCD display and the 7-segment are connected to the same VCC and GND pins at the arduino, may be to much demanded current or a coupling problem?

2024-02-23 01:18
icon