flybywiresim / aircraft

The A32NX & A380X Project are community driven open source projects to create free Airbus aircraft in Microsoft Flight Simulator that are as close to reality as possible.
https://flybywiresim.com
GNU General Public License v3.0
5.14k stars 1.12k forks source link

[REQUEST] Interfacing custom switches with SimConnect #765

Closed omrygin closed 4 years ago

omrygin commented 4 years ago

Is your feature request related to a problem? Please describe.

FSUIPC not recognizing switch toggling of smoke sign, seat belts, emergency exists etc.

Describe the feature you'd like to see implemented

For interfacing with e.g. Arduino to make home cockpits, one needs these EventIDs to bind them to switches on the board.

References

Additional context

Discord username (if different from GitHub): omryg

Venorcis commented 4 years ago

See #597

UncleClapton commented 4 years ago

The tl;dr here is that this is really out of our control at the moment. The simvars we introduce for various buttons are really more for our internal use, but not because we want it that way. If we knew of a way we could expose them over simconnect we would.

I'm going to close this issue since we can't really do much right now. If anyone knows of a method we could use to expose simvars then feel free to comment or open a new issue.

GRnice commented 4 years ago

Hi,

I've found a thread in FSDeveloper about this subject https://www.fsdeveloper.com/forum/threads/simconnect-accessing-local-variables.448704/

from what I understood, currently it's not easy to expose custom simvar

omrygin commented 4 years ago

It seems as some variables are exposed. How can that be? Here's what I found using spad.next:

image

lukecologne commented 4 years ago

Those are default SimVars.

GRnice commented 4 years ago

Specific commands (example: PTU button ON/OFF) can't be exposed from default SimVars. But for your initial request @omrygin I think it's possible to enable/disable smoke sign & seat belts sign by using default SimVars. A32NX must use these simvars:

CABIN_SEATBELTS_ALERT_SWITCH CABIN_NO_SMOKING_ALERT_SWITCH