private void ChangeCamera() { Command switchCameraCommand = new SwitchCameraCommand(DroneCameraMode.NextMode); if (!droneControl.IsCommandPossible(switchCameraCommand) || videoRecorder.IsVideoCaptureRunning) { return; } droneControl.SendCommand(switchCameraCommand); UpdateUIAsync("Changing camera"); }
private void Takeoff() { if (droneInAir) { return; } Command takeOffCommand = new FlightModeCommand(DroneFlightMode.TakeOff); if (!droneControl.IsCommandPossible(takeOffCommand)) { return; } currentStatusMsg = "Initiating Drone take off.."; droneControl.SendCommand(takeOffCommand); Thread.Sleep(5000); droneInAir = true; //UpdateUIAsync("Taking off"); }
private void Takeoff() { Command takeOffCommand = new FlightModeCommand(DroneFlightMode.TakeOff); if (!droneControl.IsCommandPossible(takeOffCommand)) { return; } droneControl.SendCommand(takeOffCommand); UpdateUIAsync("Taking off"); }
private void Takeoff() { if (!droneControl.IsConnected) { Connect(); } if (droneControl.IsHovering && droneControl.IsFlying) { return; } Command takeOffCommand = new FlightModeCommand(DroneFlightMode.TakeOff); if (!droneControl.IsCommandPossible(takeOffCommand)) { return; } currentStatusMsg = "Initiating Drone take off.."; droneControl.SendCommand(takeOffCommand); //Thread.Sleep(5000); //UpdateUIAsync("Taking off"); }