public Queries(TelloClient Client) { InitializeComponent(); this.client = Client; list_queries.ItemsSource = queries; list_queries.SelectedIndex = 0; }
public GamePadController(Core core, TelloClient client, ILogger <GamePadController> logger) { this.core = core; this.logger = logger; this.client = client; Init(); }
public CurveEditor(TelloClient Client) { InitializeComponent(); client = Client; points = new List <Circle>(); red = new SolidColorBrush(Colors.PaleVioletRed); green = new SolidColorBrush(Colors.LightGreen); }
public ConsoleWorker(Core core, TelloClient client, GamePadController gamePad, ILogger <ConsoleWorker> logger) { this.core = core; this.logger = logger; this.client = client; this.gamePad = gamePad; gamePadEnabled = false; }
public Core(ILogger <Core> logger, TelloClient client, TelloStateServer stateServer, FFmpeg ffmpeg) { this.logger = logger; this.client = client; this.stateServer = stateServer; this.ffmpeg = ffmpeg; stateServer.OnState += (s) => telloState = s; stateServer.OnException += (ex) => logger.LogError(ex, "stateServer.OnException"); }
private bool Init() { string ip = txt_drone_ip.Text; if (AvailabilityChecker.IsAddressAvailable(ip)) { if (client == null) { client = new TelloClient(ip, this); } txt_current_speed.Content = client.CurrentSpeed; return(true); } MessageBox.Show(String.Format("Drone host is not available: {0}", ip)); return(false); }
private void ListenTello() { // TODO handle timeouts Task.Run(async() => { while (true) { var received = await TelloClient.ReceiveAsync(); var receivedStr = Encoding.ASCII.GetString(received.Buffer); if (receivedStr.StartsWith("conn_ack")) { _isConnected = true; ConnectionStatusHandler(this, new ConnectionStatusEventArgs(ConnectionStatus.Connected)); } } }); }