/// import { Crazyflie } from '../crazyflie'; import { Packet } from '../packet'; import { Uri } from '../uri'; import { EventEmitter } from 'events'; import * as usb from 'usb'; export declare class Crazyradio extends EventEmitter { options: CrazyradioOptions; version: number; private initialized; private device; private interface; private inEndpoint; private outEndpoint; private inStream; private outStream; private consoleLine; private fallbackPingInterval; private fallbackPingTimeout; private pingInterval; private packetResponseTimeout; /** * Class for controlling the Crazyradio */ constructor(); /** * For doing all the asynchronous setup of the Crazyradio */ init(options: CrazyradioOptions, device?: usb.Device): Promise; /** * Configure new options */ configure(options: CrazyradioOptions): Promise; /** * Close the dongle */ close(): Promise<{}>; /** * Tune into the correct parameters to connect to a Crazyflie uri and return a Crazyflie instance */ connect(uri: Uri): Promise; /** * Stop connecting to the drone */ disconnect(): void; /** * Scan for any nearby Crazyflies */ findDrones(): Promise; /** * Scan for any drones on a specific data rate */ scanRange(dataRate: number): Promise; /** * Ping the Crazyflie */ ping(): Promise<{}>; /** * Communicating with the Crazyflies */ sendPacket(packet: Packet): Promise<{}>; private onInStreamData(data); private onInStreamError(err); /** * Configuration functions */ setRadioChannel(channel: number): Promise; setRadioAddress(address: number): Promise; setDataRate(rate: number): Promise; setRadioPower(power: number): Promise; setAckRetryDelay(delay: number): Promise; setAckRetryDelayMicroseconds(microseconds: number): Promise; setAckRetryDelayBytes(bytes: number): Promise; setAckRetryCount(count: number): Promise; setAckEnable(active: boolean): Promise; setContCarrier(active: boolean): Promise; scanChannels(start?: number, stop?: number, packet?: Buffer): Promise; private sendVendorSetup(request, value, index?, data?); private getVendorSetup(request, value, index, length); /** * Find available Crazyradios plugged in via USB */ static findRadios(vid?: number, pid?: number): usb.Device[]; /** * Find ALL USB devices plugged into the Computer */ static findUSBDevices(): usb.Device[]; } export declare const defaultOptions: CrazyradioOptions; export interface CrazyradioOptions { channel?: number; address?: number; dataRate?: number; radioPower?: number; ard?: number; arc?: number; ackEnable?: boolean; contCarrier?: boolean; }