tello-api-client
Version:
Tello API Client for Node.js.
33 lines (32 loc) • 1.42 kB
TypeScript
export declare enum FlipCommand {
Left = "l",
Right = "r",
Forward = "f",
Back = "b",
BackLeft = "bl",
BackRight = "rb",
FrontLeft = "fl",
FrontRight = "fr"
}
export declare class TelloClient {
private readonly socket;
private readonly config;
constructor(ipAddress?: string, port?: number);
command(cb?: (e: Error, data: number) => void): void;
takeoff(cb?: (e: Error, data: number) => void): void;
land(cb?: (e: Error, data: number) => void): void;
up(cm: number, cb?: (e: Error, data: number) => void): void;
down(cm: number, cb?: (e: Error, data: number) => void): void;
left(cm: number, cb?: (e: Error, data: number) => void): void;
right(cm: number, cb?: (e: Error, data: number) => void): void;
forward(cm: number, cb?: (e: Error, data: number) => void): void;
back(cm: number, cb?: (e: Error, data: number) => void): void;
cw(rotate: number, cb?: (e: Error, data: number) => void): void;
ccw(rotate: number, cb?: (e: Error, data: number) => void): void;
flip(command: FlipCommand, cb?: (e: Error, data: number) => void): void;
setSpeed(cmPerSecond: number, cb?: (e: Error, data: number) => void): void;
getSpeed(cb?: (e: Error, data: number) => void): void;
getBattery(cb?: (e: Error, data: number) => void): void;
getFlightTime(cb?: (e: Error, data: number) => void): void;
private sendCommand;
}