Class: ThrottleLeverManager
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:119
A manager for virtual throttle levers. Intercepts key events that control engine throttle settings and uses them to move virtual throttle levers instead. The positions of the virtual throttle levers are published on the event bus.
Constructors
Constructor
new ThrottleLeverManager(
bus
,onInitCallback?
,options?
):ThrottleLeverManager
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:157
Constructor.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
onInitCallback? | () => void | A callback function to be executed once this manager is initialized. |
options? | Readonly <ThrottleLeverManagerOptions > | Options with which to configure the manager. |
Returns
ThrottleLeverManager
Methods
awaitInit()
awaitInit():
Promise
<void
>
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:479
Waits until this manager has been initialized.
Returns
Promise
<void
>
A Promise that is fulfilled when this manager has been initialized.
changeThrottleLeverPos()
changeThrottleLeverPos(
index
,delta
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:538
Changes the position of a throttle lever.
Note: This method ignores the state of the VR group interaction flag. Only the position of specified throttle lever will be changed.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to change, from 1 to 4, inclusive. |
delta | number | The amount by which to change the lever position. The full lever range is expressed as -1 to +1. |
Returns
number
The throttle lever position at the end of the operation, in the range -1 to +1.
Throws
Error if index
is out of bounds.
changeThrottleLeverPosRaw()
changeThrottleLeverPosRaw(
index
,delta
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:572
Changes the raw position of a throttle lever.
Note: This method ignores the state of the VR group interaction flag. Only the position of specified throttle lever will be changed.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to change, from 1 to 4, inclusive. |
delta | number | The amount by which to change the raw lever position. The full lever range is expressed as -16384 to +16384. |
Returns
number
The raw throttle lever position at the end of the operation, in the range -16384 to +16384.
Throws
Error if index
is out of bounds.
getThrottleLeverPos()
getThrottleLeverPos(
index
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:496
Gets the position of a throttle lever.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to get, from 1 to 4, inclusive. |
Returns
number
The throttle lever position, in the range -1 to +1.
getThrottleLeverPosRaw()
getThrottleLeverPosRaw(
index
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:506
Gets the raw position of a throttle lever.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to get, from 1 to 4, inclusive. |
Returns
number
The raw throttle lever position, in the range -16384 to +16384.
Throws
Error if index
is out of bounds.
isVrGroupInteractionOn()
isVrGroupInteractionOn():
boolean
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:487
Checks whether the VR group interaction flag is set to true.
Returns
boolean
Whether the VR group interaction flag is set to true.
setThrottleLeverPos()
setThrottleLeverPos(
index
,pos
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:524
Sets the position of a throttle lever.
Note: This method ignores the state of the VR group interaction flag. Only the position of specified throttle lever will be changed.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to set, from 1 to 4, inclusive. |
pos | number | The position to set, in the range -1 to +1. |
Returns
number
The throttle lever position at the end of the operation, in the range -1 to +1.
Throws
Error if index
is out of bounds.
setThrottleLeverPosRaw()
setThrottleLeverPosRaw(
index
,pos
):number
Defined in: src/sdk/fadec/ThrottleLeverManager.ts:552
Sets the raw position of a throttle lever.
Note: This method ignores the state of the VR group interaction flag. Only the position of specified throttle lever will be changed.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the throttle lever to set, from 1 to 4, inclusive. |
pos | number | The raw position to set, in the range -16384 to +16384. |
Returns
number
The raw throttle lever position at the end of the operation, in the range -16384 to +16384.
Throws
Error if index
is out of bounds.