tello-custom-ip
Version:
Tello drone client with custom IP address support, forked from @0x77/tellots
32 lines (28 loc) • 582 B
text/typescript
// Configuration module to manage drone settings
interface TelloConfig {
ip: string;
}
// Default configuration
const config: TelloConfig = {
ip: '192.168.10.1', // Default Tello IP
};
/**
* Set the IP address for the Tello drone
* @param ip - Custom IP address to use
*/
export function setTelloIP(ip: string): void {
if (ip && typeof ip === 'string') {
config.ip = ip;
}
}
/**
* Get the current Tello IP address
* @returns The current IP address
*/
export function getTelloIP(): string {
return config.ip;
}
export default {
setTelloIP,
getTelloIP,
};