public DroneResponse MoveDown(Coordinate coordinate) { try { if (ValidateMovementRange(coordinate.Z)) { var command = ControlCommand.Down(coordinate.Z); var response = MoveDrone(command); Thread.Sleep(base.CommandDelayList[DroneConstants.DOWN]); return(response); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return(DroneResponse.FAIL); }
public async Task <DroneResponse> MoveDownAsync(Coordinate coordinate) { try { if (ValidateMovementRange(coordinate.Z)) { var command = ControlCommand.Down(coordinate.Z); var response = await MoveDroneAsync(command); await Task.Delay(base.CommandDelayList[DroneConstants.DOWN]); return(response); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return(DroneResponse.FAIL); }