plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

We prepared 3 new YouTube tutorials about Audio! They are available here.
You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!


question

FredAirland avatar image
FredAirland asked CaptMatto commented

How to set Brake Parking Position

Hello I have a comprehensive Simconnect application developed in C# where I read and write approximately 20 variables

there's one variable I am unable to set whatever I try to write which is "BRAKE PARKING POSITION "

I add it to a struct definition together with another 10 variables and so and then update regularly, all other variables work....

SimConnect.AddToDataDefinition(DEFINITIONS.AircraftVelocities, "BRAKE PARKING POSITION", "Position", SIMCONNECT_DATATYPE.FLOAT64, 0, SimConnect.SIMCONNECT_UNUSED);


I am trying to set it to 1 or fully engaged, I tried float64, int bool etc... could you please test if it is working and how ?

thanks

Fred





bugsimconnect
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered

Hello Fred,

I confirm the issue is on our side as I am unable to write this simvar through the SimVarWatcher provided with the SDK.
I created a ticket on this issue and we will have a look.

Thank you for reporting the issue.

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered CaptMatto commented

Hello Fred.

In the end, the documentation is the culprit, the "BRAKE PARKING POSITION" simvar is not writable directly but you can use the KEY_PARKING_BRAKES event id to toggle it through SimConnect.

Sorry for the inconvenience.

Regards,
Sylvain

3 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Hi @FlyingRaccoon

Just a quick note to say the SDK docs still show the brakes as being settable - is it possible to send the KEY_PARKING_BRAKES event via JS?

1634465045849.png


Is it via SimVar.SetSimVarValue("K:KEY_PARKING_BRAKES", "number", 1); ??


0 Likes 0 ·
1634465045849.png (13.2 KiB)

Hello @CaptMatto


The doc will be good with SU6.

You can call events with Coherent.call(name, params...) method.
Parameters will match the ones defined in the EventId section of the doc (very incomplete at the moment, we're working on it)

Example: Coherent.call("HEADING_BUG_SET", 1, Math.round(heading));

Regards,
Sylvain

1 Like 1 ·
CaptMatto avatar image CaptMatto FlyingRaccoon ♦♦ ·

That's awesome thank you!

I actually managed it with but will dig into the MSFS code for Coherent.calls and work out how they work. Thank you

SimVar.SetSimVarValue("K:PARKING_BRAKES", "number", Number(this.pBrake));
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.