Library globals

Namespace globals . controls

View source

(no description)

Functions

adjCondition

adjEngControl

adjMixture

adjPropeller

adjThrottle

aileronTrim

aileronTrimAxis

applyApplicableBrakes

allows one binding to do airbrakes and wheel brakes

applyBrakes

applyParkingBrake

applyPickle

autopilotDisconnect

axisHandler

Joystick axis handlers (use cmdarg). Shouldn't be called from other contexts. A non-null argument reverses the axis direction.

centerFlightControls

cycleMouseMode

deployChute

1: Deploy, -1: Release

elevatorTrim

Handlers. These are suitable for binding to repeatable button press events. They are *not* good for binding to the keyboard, since (at least) X11 synthesizes its own key repeats.

elevatorTrimAxis

Joystick axis handlers. Don't call from other contexts.

flapsDown

Wrapper around stepProps() which emulates the "old" flap behavior for configurations that aren't using the new mechanism.

gearDown

Gear handling. - parameter v is either 1 (down), -1 up (retracted)

gearToggle

gearTogglePosition

to avoid clash with "gearToggle"; this will only toggle when given a parameter of 1; as the controls button binding will pass 0 when the button is pressed and 1 when the button is released.

incAileron

arg[0] is the aileron increment arg[1] is the autopilot target heading increment

incElevator

arg[0] is the elevator increment arg[1] is the autopilot target altitude increment

incThrottle

arg[0] is the throttle increment arg[1] is the auto-throttle target speed increment

parkingBrakeToggle

perEngineSelectedAxisHandler

perIndexAxisHandler

Joystick axis handler for controlling subsets of similar properties. Shouldn't be called from other contexts. The argument engine can be either an index number or a list of index numbers. Use only when perEngineSelectedAxisHandler() below will not do.

ptt

Communication.

replaySkip

reverserTogglePosition

rudderTrim

rudderTrimAxis

selectAllEngines

selectEngine

selectEngines

Selects (state=1) or deselects (state=0) a list of engines, or all engines if no list is specified. Example: selectEngines(1, 1, 3, 5);

setElevatorTrimToPosition

setForAllEnginesProperty

setMouseFlightControlsSensitivity

slewProp

"Slews" a property smoothly, without dependence on the simulator frame rate. The first argument is the property name. The second is a rate, in units per second. NOTE: this modifies the property for the current frame only; it is intended to be called by bindings which repeat each frame. If you want to cause motion over time, see interpolate(). Returns new value.

speedup

startEngine

stepMagnetos

stepProps

Steps through an "array" of property settings. The first argument specifies a destination property. The second is a string containing a global property tree. This tree should contain an array of indexed <setting> children. This function will maintain a <current-setting> child, which contains the index of the currently active setting. The third argument specifies an integer delta, indicating how many steps to move through the setting array. Note that because of the magic of the property system, this mechanism works for all scalar property types (bool, int, double, string). TODO: This interface could easily be extended to allow for wrapping, in addition to clamping, allowing a "cycle" of settings to be defined. It could also be hooked up with the interpolate() call, which would allow the removal of the transition-time feature from YASim. Finally, other pre-existing features (the views and engine magnetos, for instance), work similarly but not compatibly, and could be integrated.

stepSlats

stepSpoilers

throttleMouse

toggleLights

Lighting.

toggleNWS

trigger

Weapon handling.

weaponSelect

wingSweep

wingsDown

Variables

THROTTLE_RATE

TRIM_RATE

Standard trim rate, in units per second. Remember that the full range of a trim axis is 2.0. Should probably read this out of a property...

carbHeatAxis

conditionAxis

engines

Initialization.

fullBrakeTime

Brake handling.

mixtureAxis

propellerAxis

setElevatorTrimToPosition_listener

throttleAxis

weAppliedSpeedBrake

weAppliedWheelBrake