Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)
def translate_to_rpc(self, rpcResult):
return {
0: mission_pb2.MissionResult.UNKNOWN,
1: mission_pb2.MissionResult.SUCCESS,
2: mission_pb2.MissionResult.ERROR,
3: mission_pb2.MissionResult.TOO_MANY_MISSION_ITEMS,
4: mission_pb2.MissionResult.BUSY,
5: mission_pb2.MissionResult.TIMEOUT,
6: mission_pb2.MissionResult.INVALID_ARGUMENT,
7: mission_pb2.MissionResult.UNSUPPORTED,
8: mission_pb2.MissionResult.NO_MISSION_AVAILABLE,
9: mission_pb2.MissionResult.FAILED_TO_OPEN_QGC_PLAN,
10: mission_pb2.MissionResult.FAILED_TO_PARSE_QGC_PLAN,
11: mission_pb2.MissionResult.UNSUPPORTED_MISSION_CMD,
12: mission_pb2.MissionResult.TRANSFER_CANCELLED
}.get(self.value, None)