How to use the mavsdk.generated.camera.CameraResult.Result function in mavsdk

To help you get started, we’ve selected a few mavsdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
"""
         Stop current video streaming.

         Raises
         ------
         CameraError
             If the request fails. The error contains the reason for the failure.
        """

        request = camera_pb2.StopVideoStreamingRequest()
        response = await self._stub.StopVideoStreaming(request)

        
        result = self._extract_result(response)

        if result.result is not CameraResult.Result.SUCCESS:
            raise CameraError(result, "stop_video_streaming()")
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpcCameraResult):
        """ Translates a gRPC struct to the SDK equivalent """
        return CameraResult(
                
                CameraResult.Result.translate_from_rpc(rpcCameraResult.result),
                
                
                rpcCameraResult.result_str
                )
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / camera.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: CameraResult.Result.UNKNOWN,
                    1: CameraResult.Result.SUCCESS,
                    2: CameraResult.Result.IN_PROGRESS,
                    3: CameraResult.Result.BUSY,
                    4: CameraResult.Result.DENIED,
                    5: CameraResult.Result.ERROR,
                    6: CameraResult.Result.TIMEOUT,
                    7: CameraResult.Result.WRONG_ARGUMENT,
                }.get(rpc_enum_value, None)