Version: SU14
Frequency: Consistently
Severity: Blocker
Bug description:
As the title says, sending "K:RUDDER_SET, K:ELEVATOR_SET or K:AILERON_SET inputs break the autopilot reference controls.
FLC mode will jump 10 knots per input. Some users also have the same issue with the heading bug, only jumping in increments of 10.
In my code I grab user inputs, modify them with trim and other inputs and send them back to game.
(L:RUDDER_POSITION, Percent) -163.83 * (>K:RUDDER_SET)
is the end result.
Sending the normal AVAR doesnt have this issue, however some users to completly lose rudder control after a few min using this method.
(L:RUDDER_POSITION, Percent) (>A:RUDDER POSITION, Percent)
The video below explains better.
Attachments:
For this demo I disabled the elevator and aileron inputs.
This bug is very severe for us as we have a broken plane no matter which method we use.
K:AXIS_LEFT/RIGHT_BRAKE_SET also causes this problem.
For our upcomming plane with a castoring nosewheel, we wish to have brake assist system to help people without rudderpedals. With this bug this wont be possible.
Hello @MrTommymxr
Are you able to replicate this on Asobo aircraft?
I checked on the Da62 but didn’t witness this issue.
If not, please send us a version of your package as instructed in section 3 of this page.
Regards,
Sylvain
With this code you can replicate the issue.
Copy paste it in the da62 and the issue will show. You can also remove the comment for the Avar.
<Component ID="testy">
<UseInputEvent ID="INPUT_RUDDER"/>
</Component>
<InputEvent ID="INPUT_RUDDER">
<Presets>
<Preset ID="PRESET_RUDDER">
<Value>
<Units>percent</Units>
<Code>
(L:INPUT_RUDDER, percent) -163.83 * (>K:RUDDER_SET)
(*L:INPUT_RUDDER, percent) (>A:RUDDER POSITION, Percent*)
</Code>
<Init>
</Init>
<WatchVars>
<Simvar ID="ANIMATION DELTA TIME"/>
<Localvar ID="INPUT_RUDDER"/>
</WatchVars>
</Value>
<Inc>
<Code>
(L:INPUT_RUDDER, Percent) p0 3 * + -100 max 100 min (>L:INPUT_RUDDER, percent)
</Code>
<Parameters>
<Param Type="Float" RPN="True">p0</Param>
</Parameters>
<Bindings>
<Binding EventID="RUDDER_RIGHT">
<Param>1</Param>
</Binding>
</Bindings>
</Inc>
<Dec>
<Code>
(L:INPUT_RUDDER, Percent) p0 3 * - -100 max 100 min (>L:INPUT_RUDDER, percent)
</Code>
<Parameters>
<Param Type="Float" RPN="True">p0</Param>
</Parameters>
<Bindings>
<Binding EventID="RUDDER_LEFT">
<Param>1</Param>
</Binding>
</Bindings>
</Dec>
<Set>
<Code>
p0 (>L:INPUT_RUDDER, percent)
</Code>
<Parameters>
<Param Type="Float" RPN="True">p0</Param>
</Parameters>
<Bindings>
<Binding EventID="AXIS_RUDDER_SET">
<Param Type="Float" RPN="True">p0 -100 *</Param>
</Binding>
<Binding EventID="RUDDER_AXIS_PLUS">
<Param Type="Float" RPN="True">p0 100 *</Param>
</Binding>
</Bindings>
</Set>
</Preset>
</Presets>
</InputEvent>
1 Like
Got it!
So the problem is not the key event itself, it’s the fact that you send it continuously though an input event.
Your input event is considered as a key press by the sim and the variable used to detect repeated key presses and therefore what increment to use for AP events, is global.
You want to move the K event call outside your InputEvent definition.
If this is something you need to evaluate continuously, you can use the ASOBO_GT_Update
template.
Doing so should solve your problem.
Let me know if this is ok or if you have additional questions.
Regards,
Sylvain
It works, thanks!
What frequency can you recomend? I found setting above 60hz isnt stable and anything below isnt smooth, regardless what frame rate im getting. Ill try setting 100 and see what happends.
Any chance the input events system will be investigated further?
What do you mean by “isn’t stable”?
Nothing I can recommend, it depends on usage really.
InputEvents will not be modified, this is their expected behavior.
Regards,
Sylvain
1 Like
ok.
I was doing some physics calculations and above 60hz it wasn’t stable anymore