Results 1 to 3 of 3
  1. #1
    150+ Forum Groupie
    Join Date
    Nov 2015
    Location
    Krefeld, GER
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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?

  2. #2
    10+ Posting Member
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    14
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  3. #3
    150+ Forum Groupie
    Join Date
    Nov 2015
    Location
    Krefeld, GER
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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