Skip to main content

Type Alias: ThrottleLeverManagerOptions

ThrottleLeverManagerOptions = object

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:51

Configuration options for ThrottleLeverManager.

Properties

keyEventHandler()?

optional keyEventHandler: (keyEventData, controller) => boolean

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:85

A callback function which handles intercepted throttle key events. If not defined or if the function returns false, then the intercepted key event will be handled using default logic that attempts to replicate how the sim natively handles the key event.

Parameters

ParameterTypeDescription
keyEventDataReadonly<KeyEventData>The key event data.
controllerThrottleKeyEventHandlerControllerA controller for virtual throttle lever position.

Returns

boolean

Whether the event was handled.


rawStep?

optional rawStep: number

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:69

The raw step by which to change throttle lever position in response to one of the increment/decrement events. The full lever range is expressed as -16384 to +16384. Ignored if step is defined. Defaults to 256.


rawStepSmall?

optional rawStepSmall: number

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:75

The raw step by which to change throttle lever position in response to one of the small increment/decrement events. The full lever range is expressed as -16384 to +16384. Ignored if step is defined. Defaults to 128.


step?

optional step: number

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:56

The step by which to change throttle lever position in response to one of the increment/decrement events. The full lever range is expressed as -1 to +1. If not defined, then rawStep is used instead to define the step.


stepSmall?

optional stepSmall: number

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:63

The step by which to change throttle lever position in response to one of the small increment/decrement events. The full lever range is expressed as -1 to +1. If not defined, then rawStepSmall is used instead to define the small step.


throttleLeverHandler()?

optional throttleLeverHandler: (index, currentPos, newPos, keyEvent?) => number

Defined in: src/sdk/fadec/ThrottleLeverManager.ts:97

A callback function which handles requested changes to throttle lever position. If not defined, then all requested changes to throttle lever position will be processed as-is.

Parameters

ParameterTypeDescription
indexnumberThe index of the throttle lever.
currentPosnumberThe current throttle lever position, in the range [-1, 1].
newPosnumberThe requested new throttle lever position, in the range [-1, 1].
keyEvent?stringThe key event that triggered the requested change, or undefined if the change was not triggered by a key event.

Returns

number

The position to which the throttle lever should be set, in the range [-1, 1].