• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 Passing on masked simconnect brake events

Messages
5
Country
unitedkingdom
Hi all,

I was hoping someone could help me out with a P3D simconnect problem I'm having.

I'm a fairly experienced C programmer but a bit of a noob when it comes to simconnect.

As a proof of concept I've been looking at how to model the brakes system in an airliner, I think I've found the right idea/approach but my implementation is lacking.

When the user presses the brakes button my code successfully intercepts the event before P3D 'sees' it and I perform some validation, if the brakes aren't available I just move on but if the brakes are available I'd like to pass this "Brakes" event on to the sim but I can't get it to work.

I'm using

HRESULT check = SimConnect_TransmitClientEvent(hSc, SIMCONNECT_OBJECT_ID_USER, KEY_BRAKES, 0, SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);

check comes back as S_OK but the brakes don't even twitch...

2 questions..

1) Am I going about this the right way or is there a better approach?

2) How do I send the masked event on to P3D so it then reacts to it?

Cheers,

Ian
 
Messages
1,983
Country
us-ohio
The KEY_BRAKES is a momentary on/off. To keep the brakes on, a user has to hold the key (typically the '.' key down and the sim gets flooded with the keyboard input which makes the brakes stay applied.
You can't just send the brakes command one time and have them stay on. Not how that input works.

Also, your approach won't work for rudder pedals that have toe brakes.
 
Messages
5
Country
unitedkingdom
Ah, OK, thanks, that's a shame.

Ignoring the axis brakes issue, is there a better event to subscribe to for this to work or does it need a whole new approach?
 
Top