UNPKG

tello-custom-ip

Version:

Tello drone client with custom IP address support, forked from @0x77/tellots

16 lines (11 loc) 636 B
import commander from "../exchanger" import { CommandType } from "../types" import { parseCommandResponse } from "../parsers" const speed = (speed: number): Promise<boolean> => commander.send(`speed ${speed}`, parseCommandResponse, CommandType.SET) const rc = (x: number, y: number, z: number, yaw: number): Promise<boolean> => commander.send(`rc ${x} ${y} ${z} ${yaw}`, parseCommandResponse, CommandType.SET) const wifi = (ssid: string, password: string): Promise<boolean> => commander.send(`wifi ${ssid} ${password}`, parseCommandResponse, CommandType.SET) export const set = { speed, rc, wifi } export default set