How to use the mavsdk.generated.telemetry.FlightMode 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 / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
-------
         flight_mode : FlightMode
              The next flight mode

         
        """

        request = telemetry_pb2.SubscribeFlightModeRequest()
        flight_mode_stream = self._stub.SubscribeFlightMode(request)

        try:
            async for response in flight_mode_stream:
                

            
                yield FlightMode.translate_from_rpc(response.flight_mode)
        finally:
            flight_mode_stream.cancel()
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)
github mavlink / MAVSDK-Python / mavsdk / generated / telemetry.py View on Github external
def translate_from_rpc(rpc_enum_value):
        """ Parses a gRPC response """
        return {
                0: FlightMode.UNKNOWN,
                1: FlightMode.READY,
                2: FlightMode.TAKEOFF,
                3: FlightMode.HOLD,
                4: FlightMode.MISSION,
                5: FlightMode.RETURN_TO_LAUNCH,
                6: FlightMode.LAND,
                7: FlightMode.OFFBOARD,
                8: FlightMode.FOLLOW_ME,
            }.get(rpc_enum_value, None)