K:HYDRAULIC_VALVE_SET Not working as expected and documented

Version: SU4

Frequency: Consistently

Severity: High
(Low - quality of life, workflow optimization, rare enough to not impact production, etc…
High - critical but workarounds are available, important feature not working as expected, frequent enough to impact production
Blocker - prevents from working on the project, prevents from releasing the product)

Marketplace package name: if applicable

Context: What package? When editing or mounted from Community? In main menu or in flight? etc…

Similar MSFS 2020 issue: insert url here if applicable

Bug description:

When trying to implement the key event K:HYDRAULIC_VALVE_SET I was not getting the expected result. The documentation describes that this key event can be used to gradually open or close a hydraulic valve.

The first thing I noticed is that a 16k value is not received as expected.
I used the hydraulic debug menu to evaluate my code. Each valve has a slider within the debug going from 0 to 100 to gradually open/close the valve. When supplying a 16k value I am seeing that value next to the debug slider, however since the slider works from 0 to 100 it is not doing anything, the valve is almost immediately fully open.

Then I tried to set values between 0 and 100, however that does not really work either, the resulting values in the debug seem to be multiplied by 100.

So finally I am setting values between 0 and 1 which gave me the best result, however the valve is not opening or closing gradually. Instead it suddenly opens up to 100% once I reach 0.5. Above that the valve will remain open and below 0.5 it will immediately close to 0%.

Repro steps:

Attachments:

Private attachments: Send a PM to @PrivateContent with the link to this topic and the link to download your content

Hello @b1e1n7e

In my case, providing values in the ]0.5,1[ range does not open the valve, only 1 worked.
I suspect this event just sets the valve target and expects either 0 or 1.

I will have this reviewed.

Regards,
Sylvain

2 Likes

Hey Sylvain,

thank you very much for having a closer look at it.

1 Like

Hello @b1e1n7e

With SU5 Beta 1.7.16.0 and SDK 1.6.5, the HYDRAULIC VALVE TARGET POS simvar has been made writeable.
This should give you the direct control you were looking for.
Let us know if this addresses your problem.

Regards,
Sylvain

1 Like

Hey Sylvain,

what is the unit of this simvar? I cannot find it in the documentation yet. Once I have tested it in my code I will get back to you.

image

Thank you very much, I can confirm that the new settable simvar works.

1 Like

This topic has been automatically closed after 60 days of inactivity since it was marked as fixed.

If there is important new information about this same report, you can use the “Request reopen” button below to ask the moderation team to review it again.
For other issues or broader discussion, please open a new topic in the appropriate category.