Options
All
  • Public
  • Public/Protected
  • All
Menu

Module api

@betaflight/api

A high level api for Betaflight

Betaflight api is a package built on top of the MSP protocol to provide a high level API to query objects and values from betaflight flight controllers, managing backwards compatibilty, and providing type information.

This library should be used if you want to write a user interface or query data specifically from betaflight flight controllers. This library is not gaurenteed to work with other types of flight controller.

Please see @betaflight/api-server for an even higher level graph based api for betaflight flight controllers.

PLEASE NOTE: THIS API IS CHANGING ALL THE TIME, IT IS NOT RECOMMENDED FOR PRODUCTION USAGE YET

Usage

$ yarn add @beteflight/api
import { ports, open, close, apiVersion, readFeatures, readAttitude, readGps } from "@betaflight/api";

(async () => {
  const portsList = await ports();

  console.log(portsList);

  const port = portsList[0];

  // Connect to the device, estabilsh it's an MSP device and read its API version
  await open(port, () => {
    console.log("Closed callback")
  });
  console.log(apiVersion(port));

  consolt.log(await readFeatures(port));

  while (true) {
    console.log(Promise.all([
      readAttitude(port),
      readAnalogValues(port)
    ]);
    ...
  }

  // Close the port when you are done with it
  await close(port)
})();

Index

Enumerations

Type aliases

Variables

Functions

Type aliases

AdvancedConfig

AdvancedConfig: { debugMode: number; debugModeCount: number; digitalIdlePercent: number; fastPwmProtocol: EscProtocols; gyroCalibDuration: number; gyroCheckOverflow: number; gyroHighFsr: number; gyroMovementCalibThreshold: number; gyroOffsetYaw: number; gyroSyncDenom: number; gyroToUse: number; gyroUse32kHz: boolean; motorPwmInversion: number; motorPwmRate: number; pidProcessDenom: number; useUnsyncedPwm: boolean }

Type declaration

  • debugMode: number
  • debugModeCount: number
  • digitalIdlePercent: number
  • fastPwmProtocol: EscProtocols
  • gyroCalibDuration: number
  • gyroCheckOverflow: number
  • gyroHighFsr: number
  • gyroMovementCalibThreshold: number
  • gyroOffsetYaw: number
  • gyroSyncDenom: number
  • gyroToUse: number
  • gyroUse32kHz: boolean
  • motorPwmInversion: number
  • motorPwmRate: number
  • pidProcessDenom: number
  • useUnsyncedPwm: boolean

AdvancedPidConfig

AdvancedPidConfig: { absoluteControlGain: number; acroTrainerAngleLimit: number; antiGravityMode: AntiGravityModes; autoProfileCellCount: number; dMin: { advance: number; gain: number; pitch: number; roll: number; yaw: number }; deltaMethod: number; dtermSetpoint: { transition: number; weight: number }; feedForward: { boost: number; interpolateSp: number; pitch: number; roll: number; smoothFactor: number; transition: number; yaw: number }; idleMinRpm: number; integratedYawRelax: number; iterm: { acceleratorGain: number; relax: number; relaxCutoff: number; relaxType: number; rotation: number; throttleGain: number; throttleThreshold: number }; levelAngleLimit: number; levelSensitivity: number; motorOutputLimit: number; pid: { maxVelocity: number; maxVelocityYaw: number }; rollPitchItermIgnoreRate: number; smartFeedForward: number; throttleBoost: number; thrustLinearization: number; toleranceBand: number; toleranceBandReduction: number; useIntegratedYaw: boolean; vbatPidCompensation: number; vbatSagCompensation: number; yaw: { itermIgnoreRate: number; pLimit: number } }

Type declaration

  • absoluteControlGain: number
  • acroTrainerAngleLimit: number
  • antiGravityMode: AntiGravityModes
  • autoProfileCellCount: number
  • dMin: { advance: number; gain: number; pitch: number; roll: number; yaw: number }
    • advance: number
    • gain: number
    • pitch: number
    • roll: number
    • yaw: number
  • deltaMethod: number
  • dtermSetpoint: { transition: number; weight: number }
    • transition: number
    • weight: number
  • feedForward: { boost: number; interpolateSp: number; pitch: number; roll: number; smoothFactor: number; transition: number; yaw: number }
    • boost: number
    • interpolateSp: number
    • pitch: number
    • roll: number
    • smoothFactor: number
    • transition: number
    • yaw: number
  • idleMinRpm: number
  • integratedYawRelax: number
  • iterm: { acceleratorGain: number; relax: number; relaxCutoff: number; relaxType: number; rotation: number; throttleGain: number; throttleThreshold: number }
    • acceleratorGain: number
    • relax: number
    • relaxCutoff: number
    • relaxType: number
    • rotation: number
    • throttleGain: number
    • throttleThreshold: number
  • levelAngleLimit: number
  • levelSensitivity: number
  • motorOutputLimit: number
  • pid: { maxVelocity: number; maxVelocityYaw: number }
    • maxVelocity: number
    • maxVelocityYaw: number
  • rollPitchItermIgnoreRate: number
  • smartFeedForward: number
  • throttleBoost: number
  • thrustLinearization: number
  • toleranceBand: number
  • toleranceBandReduction: number
  • useIntegratedYaw: boolean
  • vbatPidCompensation: number
  • vbatSagCompensation: number
  • yaw: { itermIgnoreRate: number; pLimit: number }
    • itermIgnoreRate: number
    • pLimit: number

AnalogValues

AnalogValues: { amperage: number; mahDrawn: number; rssi: number; voltage: number }

Type declaration

  • amperage: number
  • mahDrawn: number
  • rssi: number
  • voltage: number

Axes3D

Axes3D: { pitch: number; roll: number; yaw: number }

Type declaration

  • pitch: number
  • roll: number
  • yaw: number

BatteryConfig

BatteryConfig: { capacity: number; currentMeterSource: BatteryCurrentMeterSources; vbat: { maxCellVoltage: number; minCellVoltage: number; warningCellVoltage: number }; voltageMeterSource: BatteryVoltageMeterSources }

Type declaration

  • capacity: number
  • currentMeterSource: BatteryCurrentMeterSources
  • vbat: { maxCellVoltage: number; minCellVoltage: number; warningCellVoltage: number }
    • maxCellVoltage: number
    • minCellVoltage: number
    • warningCellVoltage: number
  • voltageMeterSource: BatteryVoltageMeterSources

BatteryState

BatteryState: { amperage: number; batteryState: number; capacity: number; cellCount: number; mAhDrawn: number; voltage: number }

Type declaration

  • amperage: number
  • batteryState: number
  • capacity: number
  • cellCount: number
  • mAhDrawn: number
  • voltage: number

BeeperConfig

BeeperConfig: { conditions: Beepers[]; dshot: { conditions: (RX_LOST | RX_SET)[]; tone: number } }

Type declaration

BlackboxConfig

BlackboxConfig: { device: BlackboxDevices; pDenom: number; rateDenom: number; rateNum: number; sampleRate: number; supported: boolean }

Type declaration

  • device: BlackboxDevices
  • pDenom: number
  • rateDenom: number
  • rateNum: number
  • sampleRate: number
  • supported: boolean

BoardInfo

BoardInfo: { boardIdentifier: string; boardName: string; boardType: number; boardVersion: number; configurationState: number | undefined; manufacturerId: string; mcuTypeId: McuTypes; sampleRateHz: number | undefined; signature: number[]; targetCapabilities: TargetCapabilities[]; targetName: string }

Type declaration

  • boardIdentifier: string
  • boardName: string
  • boardType: number
  • boardVersion: number
  • configurationState: number | undefined
  • manufacturerId: string
  • mcuTypeId: McuTypes
  • sampleRateHz: number | undefined
  • signature: number[]
  • targetCapabilities: TargetCapabilities[]
  • targetName: string

ChannelLetter

ChannelLetter: "A" | "E" | "R" | "T" | "1" | "2" | "3" | "4"

ChannelMap

ChannelMap: TupleOf<ChannelLetter, 8>

CurrentMeterConfig

CurrentMeterConfig: { id: MeterIndentiers; offset: number; scale: number; sensorType: number }

Type declaration

CurrentMeters

CurrentMeters: { amperage: number; id: MeterIndentiers; mAhDrawn: number }

Type declaration

DataFlashSummary

DataFlashSummary: { ready: boolean; sectors: number; supported: boolean; totalSize: number; usedSize: number }

Type declaration

  • ready: boolean
  • sectors: number
  • supported: boolean
  • totalSize: number
  • usedSize: number

ExtendedStatus

ExtendedStatus: Status & { armingDisabledFlags: DisarmFlags[]; cpuload: number; numProfiles: number; rateProfile: number }

FeatureBits

FeatureBits: Record<number, Features>

FilterConfig

FilterConfig: { dterm: { lowpass: LowpassFilter & { dyn: DynamicFilterValues }; lowpass2: LowpassFilter; notch: NotchFilter }; dyn: { lpfCurveExpo: number; notch: { maxHz: number; minHz: number; q: number; range: number; widthPrecent: number } }; gyro: { hardwareLpf: number; hardwareLpf32khz: number; lowpass: LowpassFilter & { dyn: { maxHz: number; minHz: number } }; lowpass2: { hz: number; type: number }; notch: NotchFilter; notch2: NotchFilter; rpmNotch: { harmonics: number; minHz: number } }; yaw: { lowpass: { hz: number } } }

Type declaration

  • dterm: { lowpass: LowpassFilter & { dyn: DynamicFilterValues }; lowpass2: LowpassFilter; notch: NotchFilter }
    • lowpass: LowpassFilter & { dyn: DynamicFilterValues }
    • lowpass2: LowpassFilter
    • notch: NotchFilter
  • dyn: { lpfCurveExpo: number; notch: { maxHz: number; minHz: number; q: number; range: number; widthPrecent: number } }
    • lpfCurveExpo: number
    • notch: { maxHz: number; minHz: number; q: number; range: number; widthPrecent: number }
      • maxHz: number
      • minHz: number
      • q: number
      • range: number
      • widthPrecent: number
  • gyro: { hardwareLpf: number; hardwareLpf32khz: number; lowpass: LowpassFilter & { dyn: { maxHz: number; minHz: number } }; lowpass2: { hz: number; type: number }; notch: NotchFilter; notch2: NotchFilter; rpmNotch: { harmonics: number; minHz: number } }
    • hardwareLpf: number
    • hardwareLpf32khz: number
    • lowpass: LowpassFilter & { dyn: { maxHz: number; minHz: number } }
    • lowpass2: { hz: number; type: number }
      • hz: number
      • type: number
    • notch: NotchFilter
    • notch2: NotchFilter
    • rpmNotch: { harmonics: number; minHz: number }
      • harmonics: number
      • minHz: number
  • yaw: { lowpass: { hz: number } }
    • lowpass: { hz: number }
      • hz: number

GpsConfig

GpsConfig: { autoBaud: boolean; autoConfig: boolean; homePointOnce: boolean; provider: GpsProtocols; ubloxSbas: GpsSbasTypes; ubloxUseGalileo: boolean }

Type declaration

  • autoBaud: boolean
  • autoConfig: boolean
  • homePointOnce: boolean
  • provider: GpsProtocols
  • ubloxSbas: GpsSbasTypes
  • ubloxUseGalileo: boolean

ImuData

ImuData: { accelerometer: ImuUnit; gyroscope: ImuUnit; magnetometer: ImuUnit }

Type declaration

ImuUnit

ImuUnit: [number, number, number]

LegacyCurrentMeterConfig

LegacyCurrentMeterConfig: { batteryCapacity: number; meterType: number; offset: number; scale: number }

Type declaration

  • batteryCapacity: number
  • meterType: number
  • offset: number
  • scale: number

LegacyVoltageMeterConfig

LegacyVoltageMeterConfig: { meterType: number; vbat: { maxCellVoltage: number; minCellVoltage: number; scale: number; warningCellVoltage: number } }

Type declaration

  • meterType: number
  • vbat: { maxCellVoltage: number; minCellVoltage: number; scale: number; warningCellVoltage: number }
    • maxCellVoltage: number
    • minCellVoltage: number
    • scale: number
    • warningCellVoltage: number

MixerConfig

MixerConfig: { mixer: number; reversedMotors: boolean }

Type declaration

  • mixer: number
  • reversedMotors: boolean

MotorConfig

MotorConfig: { maxThrottle: number; minCommand: number; minThrottle: number; motorCount: number; motorPoles: number; useDshotTelemetry: boolean; useEscSensor: boolean }

Type declaration

  • maxThrottle: number
  • minCommand: number
  • minThrottle: number
  • motorCount: number
  • motorPoles: number
  • useDshotTelemetry: boolean
  • useEscSensor: boolean

OSDAlarm

OSDAlarm: { key: OSDAlarms; value: number }

Type declaration

OSDConfig

OSDConfig: { alarms: OSDAlarm[]; displayItems: OSDDisplayItem[]; flags: OSDFlags; osdProfiles: OSDProfileConfig; parameters: OSDParameters; statisticItems: OSDStatisticItem[]; timers: OSDTimer[]; unitMode: OSDUnitTypes; videoSystem: OSDVideoTypes; warnings: OSDWarning[] }

Type declaration

OSDDisplayItem

OSDDisplayItem: { key: OSDFields; position: OSDPosition; visibilityProfiles: boolean[] }

Type declaration

OSDFlags

OSDFlags: { hasOSD: boolean; haveMax7456Video: boolean; haveOsdFeature: boolean; isMax7456Detected: boolean; isOsdSlave: boolean }

Type declaration

  • hasOSD: boolean
  • haveMax7456Video: boolean
  • haveOsdFeature: boolean
  • isMax7456Detected: boolean
  • isOsdSlave: boolean

OSDOtherData

OSDOtherData: { alarms: OSDAlarm[]; flags: OSDFlags; osdProfiles: OSDProfileConfig; parameters: OSDParameters; unitMode: OSDUnitTypes; videoSystem: OSDVideoTypes; warnings: OSDWarning[] }

Type declaration

OSDParameters

OSDParameters: { cameraFrameHeight: number; cameraFrameWidth: number; overlayRadioMode: number }

Type declaration

  • cameraFrameHeight: number
  • cameraFrameWidth: number
  • overlayRadioMode: number

OSDPosition

OSDPosition: { x: number; y: number }

Type declaration

  • x: number
  • y: number

OSDStatisticItem

OSDStatisticItem: { enabled: boolean; key: OSDStatisticFields }

Type declaration

OSDTimer

OSDTimer: { key: number; precision: OSDPrecisionTypes; src: OSDTimerSources; time: number }

Type declaration

OSDWarning

OSDWarning: { enabled: boolean; key: OSDWarnings }

Type declaration

PidConfig

PidConfig: { level: Pid; mag: Pid; pitch: Pid; roll: Pid; yaw: Pid }

Type declaration

  • level: Pid
  • mag: Pid
  • pitch: Pid
  • roll: Pid
  • yaw: Pid

RCDeadband

RCDeadband: { altHoldDeadhand: number; deadband: number; deadband3dThrottle: number; yawDeadband: number }

Type declaration

  • altHoldDeadhand: number
  • deadband: number
  • deadband3dThrottle: number
  • yawDeadband: number

RCTuning

RCTuning: { dynamicThrottleBreakpoint: number; dynamicThrottlePid: number; pitchRate: number; pitchRateLimit: number; rcExpo: number; rcPitchExpo: number; rcPitchRate: number; rcRate: number; rcYawExpo: number; rcYawRate: number; rollPitchRate: number; rollRate: number; rollRateLimit: number; throttleExpo: number; throttleLimitPercent: number; throttleLimitType: number; throttleMid: number; yawRate: number; yawRateLimit: number }

Type declaration

  • dynamicThrottleBreakpoint: number
  • dynamicThrottlePid: number
  • pitchRate: number
  • pitchRateLimit: number
  • rcExpo: number
  • rcPitchExpo: number
  • rcPitchRate: number
  • rcRate: number
  • rcYawExpo: number
  • rcYawRate: number
  • rollPitchRate: number
  • rollRate: number
  • rollRateLimit: number
  • throttleExpo: number
  • throttleLimitPercent: number
  • throttleLimitType: number
  • throttleMid: number
  • yawRate: number
  • yawRateLimit: number

RawGpsData

RawGpsData: { alt: number; fix: boolean; groundCourse: number; lat: number; lon: number; numSat: number; speed: number }

Type declaration

  • alt: number
  • fix: boolean
  • groundCourse: number
  • lat: number
  • lon: number
  • numSat: number
  • speed: number

RssiConfig

RssiConfig: { channel: number }

Type declaration

  • channel: number

RxConfig

RxConfig: { airModeActivateThreshold: number; fpvCamAngleDegrees: number; interpolation: RcInterpolations; interpolationInterval: number; rcSmoothing: { autoSmoothness: number; channels: RcSmoothingChannels; derivativeCutoff: number; derivativeType: RcSmoothingDerivativeTypes; inputCutoff: number; inputType: RcSmoothingInputTypes; type: RcSmoothingTypes }; rxMaxUsec: number; rxMinUsec: number; serialProvider: SerialRxProviders; spektrumSatBind: number; spi: { id: number; protocol: SpiRxProtocols; rfChannelCount: number }; stick: { center: number; max: number; min: number }; usbCdcHidType: number }

Type declaration

SdCardSummary

SdCardSummary: { filesystemLastError: number; freeSizeKB: number; state: SdCardStates; supported: boolean; totalSizeKB: number }

Type declaration

  • filesystemLastError: number
  • freeSizeKB: number
  • state: SdCardStates
  • supported: boolean
  • totalSizeKB: number

SerialConfig

SerialConfig: { legacy?: LegacyBaudRates; ports: PortSettings[] }

Type declaration

  • Optional legacy?: LegacyBaudRates
  • ports: PortSettings[]

Status

Status: { cycleTime: number; i2cError: number; mode: number; profile: number; sensors: Sensors[] }

Type declaration

  • cycleTime: number
  • i2cError: number
  • mode: number
  • profile: number
  • sensors: Sensors[]

VoltageMeterConfig

VoltageMeterConfig: { id: MeterIndentiers; sensorType: number; vbat: { resDivMultiplier: number; resDivVal: number; scale: number } }

Type declaration

  • id: MeterIndentiers
  • sensorType: number
  • vbat: { resDivMultiplier: number; resDivVal: number; scale: number }
    • resDivMultiplier: number
    • resDivVal: number
    • scale: number

VoltageMeters

VoltageMeters: { id: MeterIndentiers; voltage: number }

Type declaration

VtxBaseDeviceStatus

VtxBaseDeviceStatus: { band?: number; channel?: number; deviceIsReady: boolean; frequency?: number; levels: number[]; powerIndex?: number; powers: number[]; vtxStatus?: number }

Type declaration

  • Optional band?: number
  • Optional channel?: number
  • deviceIsReady: boolean
  • Optional frequency?: number
  • levels: number[]
  • Optional powerIndex?: number
  • powers: number[]
  • Optional vtxStatus?: number

VtxConfig

VtxConfig: { band: number; channel: number; deviceReady: boolean; frequency: number; lowPowerDisarm: number; pitMode: boolean; pitModeFrequency: number; power: number; table: { available: boolean; numBandChannels: number; numBands: number; numPowerLevels: number }; type: VtxDeviceTypes }

Type declaration

  • band: number
  • channel: number
  • deviceReady: boolean
  • frequency: number
  • lowPowerDisarm: number
  • pitMode: boolean
  • pitModeFrequency: number
  • power: number
  • table: { available: boolean; numBandChannels: number; numBands: number; numPowerLevels: number }
    • available: boolean
    • numBandChannels: number
    • numBands: number
    • numPowerLevels: number
  • type: VtxDeviceTypes

VtxRtc6705DeviceStatus

VtxRtc6705DeviceStatus: { type: VTXDEV_RTC6705 } & VtxBaseDeviceStatus

VtxSmartAudioDeviceStatus

VtxSmartAudioDeviceStatus: { mode: number; orfreq: number; type: VTXDEV_SMARTAUDIO; version: number; willBootIntoPitMode: boolean } & VtxBaseDeviceStatus

VtxTableBandsRow

VtxTableBandsRow: { frequencies: number[]; isFactoryBand: boolean; letter: string; name: string; rowNumber: number }

Type declaration

  • frequencies: number[]
  • isFactoryBand: boolean
  • letter: string
  • name: string
  • rowNumber: number

VtxTablePowerLevelsRow

VtxTablePowerLevelsRow: { label: string; rowNumber: number; value: number }

Type declaration

  • label: string
  • rowNumber: number
  • value: number

VtxTrampDeviceStatus

VtxTrampDeviceStatus: { type: VTXDEV_TRAMP } & VtxBaseDeviceStatus

VtxUnknownDeviceStatus

VtxUnknownDeviceStatus: { type: VTXDEV_UNKNOWN } & VtxBaseDeviceStatus

VtxUnsupportedDeviceStatus

VtxUnsupportedDeviceStatus: { type: VTXDEV_UNSUPPORTED } & VtxBaseDeviceStatus

Variables

Const BAUD_RATES

BAUD_RATES: number[] = ...

Const MCU_GROUPS

MCU_GROUPS: { F1: McuTypes[]; F3: McuTypes[]; F4: McuTypes[]; F7: McuTypes[]; H7: McuTypes[] } = ...

Type declaration

Const MIXER_LIST

MIXER_LIST: { id: number; image: string; model: string; name: string }[] = ...

Functions

Const apiVersion

  • apiVersion(port: string): string

Const availableFeatures

Const baudRate

  • baudRate(port: string): number

Const blackboxDevices

Const bytesRead

  • bytesRead(port: string): number

Const bytesWritten

  • bytesWritten(port: string): number

Const calibrateAccelerometer

  • calibrateAccelerometer(port: string): Promise<void>

Const channelLetters

Const clearVtxTable

  • clearVtxTable(port: string): Promise<void>

Const close

  • close(port: string): Promise<void>

Const commit

  • commit(port: string): Promise<void>

Const eraseDataFlash

  • eraseDataFlash(port: string): Promise<void>

Const escProtocols

Const gpsProtocols

Const initialiseSerialBackend

  • initialiseSerialBackend(bindings?: typeof BaseBinding): Promise<void>

Const isOpen

  • isOpen(port: string): boolean

Const mcuGroupFromId

  • mcuGroupFromId(mcuTypeId: McuTypes): undefined | "F7" | "F3" | "F4" | "H7" | "F1"

Const mergeDeep

  • mergeDeep<T>(target: T, source: RecursivePartial<T>): T

Const open

  • open(port: string, options?: ConnectionOptions, onClose?: OnCloseCallback): Promise<void>
  • open(port: string, onClose?: OnCloseCallback): Promise<void>
  • Open a serial connection on the given port, onClose will be emited once the connection is closed

    Parameters

    • port: string
    • Optional options: ConnectionOptions
    • Optional onClose: OnCloseCallback

    Returns Promise<void>

  • Open a serial connection on the given port, onClose will be emited once the connection is closed

    Parameters

    • port: string
    • Optional onClose: OnCloseCallback

    Returns Promise<void>

Const osdAlarms

Const osdFields

Const osdTimerSources

Const osdWarnings

Const packetErrors

  • packetErrors(port: string): number

Const ports

  • ports(): Promise<PortInfo[]>

Const rcInterpolations

Const rcSmoothingChannels

Const rcSmoothingDerivativeTypes

Const rcSmoothingInputTypes

Const rcSmoothingTypes

Const readAdvancedConfig

Const readAdvancedPidConfig

Const readAnalogValues

Const readAttitude

  • readAttitude(port: string): Promise<Axes3D>

Const readBatteryConfig

Const readBatteryState

Const readBeeperConfig

Const readBlackboxConfig

Const readBoardAlignmentConfig

  • readBoardAlignmentConfig(port: string): Promise<Axes3D>

Const readBoardInfo

  • readBoardInfo(port: string): Promise<BoardInfo>

Const readBoxIds

  • readBoxIds(port: string): Promise<Modes[]>

Const readCurrentMeterConfigs

Const readCurrentMeters

Const readDataFlashChunk

  • readDataFlashChunk(port: string, address: number, blockSize: number): Promise<Buffer>
  • Return the base 64 encoded result of the blackbox config

    Parameters

    • port: string
    • address: number
    • blockSize: number

    Returns Promise<Buffer>

Const readDataFlashSummary

Const readDisabledSensors

  • readDisabledSensors(port: string): Promise<Sensors[]>

Const readEnabledFeatures

  • readEnabledFeatures(port: string): Promise<Features[]>

Const readExtendedStatus

Const readFcVariant

  • readFcVariant(port: string): Promise<string>

Const readFilterConfig

Const readGpsConfig

  • readGpsConfig(port: string): Promise<GpsConfig>

Const readIMUData

  • readIMUData(port: string): Promise<ImuData>

Const readLegacyCurrentMeterConfig

Const readLegacyVoltageMeterConfig

Const readMixerConfig

Const readModeRangeSlots

  • readModeRangeSlots(port: string): Promise<ModeSlot[]>

Const readMotorConfig

Const readName

  • readName(port: string): Promise<string>

Const readOSDConfig

  • readOSDConfig(port: string): Promise<OSDConfig>

Const readPidConfig

  • readPidConfig(port: string): Promise<PidConfig>

Const readRCDeadband

  • readRCDeadband(port: string): Promise<RCDeadband>

Const readRCTuning

  • readRCTuning(port: string): Promise<RCTuning>

Const readRawGPS

Const readRcValues

  • readRcValues(port: string): Promise<number[]>

Const readRssiConfig

  • readRssiConfig(port: string): Promise<RssiConfig>

Const readRxConfig

  • readRxConfig(port: string): Promise<RxConfig>

Const readRxMap

Const readSdCardSummary

Const readSerialConfig

Const readStatus

  • readStatus(port: string): Promise<Status>

Const readUID

  • readUID(port: string): Promise<string>

Const readVoltageMeterConfigs

Const readVoltageMeters

Const readVtxConfig

  • readVtxConfig(port: string): Promise<VtxConfig>

Const readVtxDeviceStatus

Const readVtxTableBandsRow

  • readVtxTableBandsRow(port: string, rowNumber: number): Promise<VtxTableBandsRow>

Const readVtxTablePowerLevelsRow

Const reboot

  • reboot(port: string, type?: RebootTypes): Promise<boolean>

Const resetConfig

  • resetConfig(port: string): Promise<void>

Const serialRxProviders

Const spiRxProtocols

Const writeAdvancedConfig

  • writeAdvancedConfig(port: string, config: AdvancedConfig): Promise<void>

Const writeAdvancedPidConfig

Const writeArming

  • writeArming(port: string, __namedParameters: { armingDisabled: boolean; runawayTakeoffPreventionDisabled: boolean }): Promise<void>
  • Parameters

    • port: string
    • __namedParameters: { armingDisabled: boolean; runawayTakeoffPreventionDisabled: boolean }
      • armingDisabled: boolean
      • runawayTakeoffPreventionDisabled: boolean

    Returns Promise<void>

Const writeBatteryConfig

  • writeBatteryConfig(port: string, config: BatteryConfig): Promise<void>

Const writeBeeperConfig

  • writeBeeperConfig(port: string, config: BeeperConfig): Promise<void>

Const writeBlackboxConfig

  • writeBlackboxConfig(port: string, config: Omit<BlackboxConfig, "supported">): Promise<void>

Const writeBoardAlignmentConfig

  • writeBoardAlignmentConfig(port: string, __namedParameters: Axes3D): Promise<void>

Const writeCurrentMeterConfig

Const writeDisabledSensors

  • writeDisabledSensors(port: string, disabledSensors: Sensors[]): Promise<void>

Const writeEnabledFeatures

  • writeEnabledFeatures(port: string, features: Features[]): Promise<void>

Const writeFilterConfig

  • writeFilterConfig(port: string, config: FilterConfig): Promise<void>

Const writeGpsConfig

  • writeGpsConfig(port: string, config: GpsConfig): Promise<void>

Const writeLegacyCurrentMeterConfig

Const writeLegacyVoltageMeterConfig

Const writeMixerConfig

  • writeMixerConfig(port: string, config: MixerConfig): Promise<void>

Const writeModeRangeSlot

  • writeModeRangeSlot(port: string, slotPosition: number, slot: ModeSlot): Promise<void>

Const writeModeRangeSlots

  • writeModeRangeSlots(port: string, slots: ModeSlot[]): Promise<void>

Const writeMotorConfig

  • writeMotorConfig(port: string, config: MotorConfig): Promise<void>

Const writeName

  • writeName(port: string, name: string): Promise<void>

Const writeOSDAlarm

  • writeOSDAlarm(port: string, alarm: OSDAlarm): Promise<void>

Const writeOSDChar

  • writeOSDChar(port: string, charIndex: number, charBytes: Buffer): Promise<void>

Const writeOSDDisplayItem

  • writeOSDDisplayItem(port: string, __namedParameters: OSDDisplayItem): Promise<void>

Const writeOSDSelectedProfile

  • writeOSDSelectedProfile(port: string, selectedIndex: number): Promise<void>

Const writeOSDStatisticItem

  • writeOSDStatisticItem(port: string, __namedParameters: OSDStatisticItem): Promise<void>

Const writeOSDTimer

  • writeOSDTimer(port: string, timer: OSDTimer): Promise<void>

Const writeOSDUnitMode

  • writeOSDUnitMode(port: string, unitMode: OSDUnitTypes): Promise<void>

Const writeOSDVideoSystem

  • writeOSDVideoSystem(port: string, videoSystem: OSDVideoTypes): Promise<void>

Const writeOSDWarning

  • writeOSDWarning(port: string, warning: OSDWarning): Promise<void>

Const writePartialAdvancedConfig

  • writePartialAdvancedConfig(port: string, config: RecursivePartial<AdvancedConfig>): Promise<void>

Const writePartialAdvancedPidConfig

  • writePartialAdvancedPidConfig(port: string, config: RecursivePartial<AdvancedPidConfig>): Promise<void>

Const writePartialBeeperConfig

  • writePartialBeeperConfig(port: string, config: RecursivePartial<BeeperConfig>): Promise<void>

Const writePartialBlackboxConfig

  • writePartialBlackboxConfig(port: string, config: RecursivePartial<BlackboxConfig>): Promise<void>

Const writePartialFilterConfig

  • writePartialFilterConfig(port: string, config: RecursivePartial<FilterConfig>): Promise<void>

Const writePartialMixerConfig

  • writePartialMixerConfig(port: string, config: RecursivePartial<MixerConfig>): Promise<void>

Const writePartialOSDParameters

  • writePartialOSDParameters(port: string, parameters: RecursivePartial<OSDParameters>): Promise<void>

Const writePartialPidConfig

  • writePartialPidConfig(port: string, config: RecursivePartial<PidConfig>): Promise<void>

Const writePartialRxConfig

  • writePartialRxConfig(port: string, config: RecursivePartial<RxConfig>): Promise<void>

Const writePartialVtxConfig

  • writePartialVtxConfig(port: string, config: RecursivePartial<VtxConfig>): Promise<void>

Const writePidConfig

  • writePidConfig(port: string, config: PidConfig): Promise<void>

Const writeRssiConfig

  • writeRssiConfig(port: string, config: RssiConfig): Promise<void>

Const writeRxConfig

  • writeRxConfig(port: string, config: RxConfig): Promise<void>

Const writeRxMap

Const writeSerialConfig

  • writeSerialConfig(port: string, config: SerialConfig): Promise<void>

Const writeVoltageMeterConfig

Const writeVtxConfig

  • writeVtxConfig(port: string, config: Omit<VtxConfig, "table"> & { table: { numBandChannels: number; numBands: number; numPowerLevels: number } }, clearVtxTable?: boolean): Promise<void>
  • Parameters

    • port: string
    • config: Omit<VtxConfig, "table"> & { table: { numBandChannels: number; numBands: number; numPowerLevels: number } }
    • clearVtxTable: boolean = false

    Returns Promise<void>

Const writeVtxTableBandsRow

Const writeVtxTablePowerLevelsRow

Generated using TypeDoc