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
JR111
Posts: 18
Hello,

Please can someone share how to use KD2-22 momentary buttons with a default AC using standard FSUIPC offsets?
If you can share images of your MF config (input/output) that would be great.

When I push the button, the AP ALT HOLD turns on, and when I let go, the AP button turns off.
I need to be able to keep the AP ALT HOLD on when button is released. Then, when pushed for the second time, turn off the AP ALT HOLD.

Many thanks.
2020-12-26 19:28
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi JR,
the KD2-22 is a double non latching switch with built in led. Look this datasheet:

http://www.yxswitch.com/KD2_push_button_switch/34_218.html

The AP ALT HOLD is a toggle. 1st press is to switch it on, 2nd press to switch it off. In this case you only has to config the OnPress in MF.

If you have also configured the OnRelease part then you switch it on when pressing the button and switch it off in the moment you release. So delete the OnRelease part.
Grüße,
Stephan (Time: UTC+2)
2020-12-27 13:03
Avatar
JR111
Posts: 18
Hi Stephan,
Thanks for the advice.

I removed the OnRelease section, keeping the OnPress only.
When I push the button and release, the AP ALT HOLD goes on.
When I push for the 2nd time, it does not turn off.

To make it work (sure there are smarter ways to do it), is to have 2 INPUT configs:
1) MCP ALT HOLD ON - OnPress, set value to 1. The OnRelease not touched.
2) MCP ALT HOLD OFF - OnPress, set value to 0. The OnRelease not touched.

I have 1 OUTPUT config where it reviews the LED on the KD22-2.
For 2) I made a precondition to observe the LED. If the LED is 1, then it should turn off based on config 2.

2020-12-27 15:34
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi JR,

what simulator do you use and what aircraft (stock, addon)?

why do you take an offset for an input? Offsets are Outputs.

For inputs you should take EventIDs and for AP ALT HOLD ON it is 65808, for AP ALT HOLD OFF it is 65816.

For that you should not take a momentary switch but a latching one. When using a latching one you can also use the OnRelease section.
Grüße,
Stephan (Time: UTC+2)
2020-12-27 18:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Mabe this is in case FS2020 not work perfectly at the moment ( The mannaged mode in Airbus) So Here the Old Events wont work as i know....


Whatever the System with 2 Configs and preconditions make no sense. Also the Code is wrong !

In the Screenshot the first Config ( MCP ALT HOLD ON) have no Precondition.... So it will work always !
In case the other Config is BEHIND it will work.... If AP ALT is currently ON then a Button Press will set it again to ON ( First Config that work always) and the Next Config some milliseconds later disbaled it again ( And only if its precondition is true).....

So. YES this workes.... But guys.... this is way to difficult and fully unlogical.

SOLUTION:

Make ONE Config. Use ON PRESS Only. Typ FSUIPC Offset
Input Value : if($=0,1,0)

No second config needed.... No Precondition.
Good Luck !
2020-12-28 02:25
icon