Results 1 to 3 of 3
-
12-27-2017, 04:15 PM #1
- Join Date
- Nov 2015
- Location
- Krefeld, GER
- Posts
- 243
FSUIPC Offset value only taken for a second
I am having a strange phenomenon with my self build gear lever.
It used to work, but since a couple of days - don't ask me, what has changed - the programmed offset is not working anymore.
I am using Arduino/Mobiflight, to read the value of a switch like this one:https://www.reichelt.de/Schnappschal...0103c5b7fa26c9
One switch is triggered, when gear lever is down, another when the gear lever is moved up.
Now when I move the gear lever down for example, the switch is triggered (can see that in Mobilflight), but the value is only read for a second, than immediately jumps back to the previous value (see that in FSUIPC logging), although the switch is still in the push position.
I disabled the function to see, if another mechanism is causing this, but there is none. It's just that single switch being involved.
Any ideas, why the new value is not kept?
-
12-29-2017, 02:52 AM #2
- Join Date
- Nov 2013
- Location
- Evansville, Indiana
- Posts
- 14
Re: FSUIPC Offset value only taken for a second
Michael,
Could be a bad or noisy switch.
If its not bad, then you may need some debounce code in your Arduino for the switch. Sometimes switches make multiple contacts sending multiple signals.
I would also check your wiring for shorts. Push on connectors can cause problems. Soldering the connections can prevent shorts.
Are your switches wired up to the Arduino using INPUT_PULLUP code to make the pin HIGH and then detect a LOW when pressed?
If you do it the other way with the pin LOW and then detect HIGH when pressed you can get issues if your pulldown resistor wiring gets a short and then the pin starts to float.
INPUT_PULLUP is my preferred way as it does not require a pulldown resistor.
~Fess
-
12-29-2017, 06:24 PM #3
- Join Date
- Nov 2015
- Location
- Krefeld, GER
- Posts
- 243
Re: FSUIPC Offset value only taken for a second
I found out, the button is working with the standard FSX planes. So the root cause lies within the plane software (Jeehell A320). Actually I installed a new release shortly. So will investigate there.
But thanks for the quick support!
Michael
Looking for Fun? Connect with Women Seeking Casual Encounters in Your Town
JH startup on Client PC