How to use the mavsdk.generated.mission.MissionResult.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 / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpcMissionResult):
        """ Translates a gRPC struct to the SDK equivalent """
        return MissionResult(
                
                MissionResult.Result.translate_from_rpc(rpcMissionResult.result),
                
                
                rpcMissionResult.result_str
                )
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
A multicopter should just hover at the spot while a fixedwing vehicle should loiter
         around the location where it paused.

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

        request = mission_pb2.PauseMissionRequest()
        response = await self._stub.PauseMission(request)

        
        result = self._extract_result(response)

        if result.result is not MissionResult.Result.SUCCESS:
            raise MissionError(result, "pause_mission()")
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / mission.py View on Github external
def translate_from_rpc(rpc_enum_value):
            """ Parses a gRPC response """
            return {
                    0: MissionResult.Result.UNKNOWN,
                    1: MissionResult.Result.SUCCESS,
                    2: MissionResult.Result.ERROR,
                    3: MissionResult.Result.TOO_MANY_MISSION_ITEMS,
                    4: MissionResult.Result.BUSY,
                    5: MissionResult.Result.TIMEOUT,
                    6: MissionResult.Result.INVALID_ARGUMENT,
                    7: MissionResult.Result.UNSUPPORTED,
                    8: MissionResult.Result.NO_MISSION_AVAILABLE,
                    9: MissionResult.Result.FAILED_TO_OPEN_QGC_PLAN,
                    10: MissionResult.Result.FAILED_TO_PARSE_QGC_PLAN,
                    11: MissionResult.Result.UNSUPPORTED_MISSION_CMD,
                    12: MissionResult.Result.TRANSFER_CANCELLED,
                }.get(rpc_enum_value, None)