• 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.

Throttle Programming in a Gauge

Messages
10,149
Country
us-arizona
Can one tell the throttle to go to say 25% and have it override the joystick and keyboard for a timed amount of time?




Bill
 
(A:GENERAL ENG THROTTLE LEVER POSITION:index, percent) is settable.

I am not positive, but I believe is you set and control that is normally controlled with a joystick axis, it will stay where you set it, unless the axis moves.

So, as long as the input axis isn't moved during your set period of time, this should be possible. If you want the throttle to return to the previous position after the set time, just store the position before manually setting it, and restore that position later.
 
Thanks guys,

DNLK,

I was actually more interested in an invisible gauge that worked behind the scenes, adjusting output of the engine per overheating settings.

I need it to work in FS9 though.....


Bill
 
The short answer is that K: throttle variables will override a joystick throttle for only as long as that joystick throttle remains constant. Even a lot of noise will trigger the throttle's return to the hardware position. Your gauge can force it back, but then you end up with a tug of war between your gauge and the hardware throttle.
 
The two ways would be to use either SimConnect or FSUIPC to "intercept" the hardware throttle axis input, then inject your own setting into FS9/FSX.

For FS9 obviously, only the FSUIPC method would work (which is what was used in the Citation X).

In both instances though, it would have to use C code and be compiled to either a gauge or hidden .dll file.
 
The two ways would be to use either SimConnect or FSUIPC to "intercept" the hardware throttle axis input, then inject your own setting into FS9/FSX.

Interesting. Does this work for sure?
Will it work for the elevator axis of an autopilot?
I asked about this on Avsim - at the time I was told there was no way to override a joystick input.
 
Danny, I honestly don't know. I do know that intercepting the throttle's does work, because it's been done in our Citation X.

Check out Pete's FSUIPC SDK and you may find an answer. If FSUIPC reads it; it should be "blockable..."
 
Thanks Bill, this has been one of my back burner problems ;)
So I'm glad to learn simConnect and FSUIPC may help here.
 
Bill, I had this problem when I worked for the throttle lever fixator.
This is my solution:

Code:
(L:Throttle Fix,bool) 0 !=
if{
    (A:General Eng1 throttle lever position,part) (L:Throttle_Anim,enum) != 
    if{ (L:Throttle_Anim,enum) 16384 * (>K:THROTTLE1_SET) }
}
els{ (A:general eng1 throttle lever position,part) (>L:Throttle_Anim,enum) }
(L:Throttle Fix,bool) controls whether the position of the throttle is fixed or not. When set to 1, the throttle is fixed.
(L:Throttle_Anim,enum) is stored position, and is used for animation instead of (A: General eng1 throttle...) to avoid shaking when trying to adjust the lever through the keyboard or joystick (the actual throttle position is quickly fixed, but not fast enough).

If you need to set the position exactly at a particular value, the code is slightly simpler:
Code:
0.25 (>L:Throttle_Anim,enum) (* 0.00 to 1.00 *)

(L:Throttle Fix,bool)
if{
    (A:General Eng1 throttle lever position,part) (L:Throttle_Anim,enum) != 
    if{ (L:Throttle_Anim,enum) 16384 * (>K:THROTTLE1_SET) }
}

Dont forget to modify the animation (example from default Baron):
Code:
<Element>
    <Image Name="ECU_Left_Throttle.bmp" ImageSizes="45,35,72,56">
    <Axis X="44" Y="23"/>
    </Image>
    <Shift>
        [COLOR="Red"]<Value Minimum="0" Maximum="1">(L:Throttle_Anim,enum)</Value>[/COLOR]
        <Nonlinearity>
        <Item Value="0" X="43" Y="145"/>
        <Item Value="1" X="43" Y="42"/>
        </Nonlinearity>
    </Shift>
</Element>
 
Back
Top