From a9e30ed82aa2d6acab83cabeffa6d8ce453e5581 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 16 Apr 2024 11:33:03 +1200 Subject: [PATCH] Update to MAVSDK v2.8.0 Signed-off-by: Julian Oes --- MAVSDK_SERVER_VERSION | 2 +- mavsdk/action.py | 25 +++++ mavsdk/action_pb2.py | 206 +++++++++++++++++++++----------------- mavsdk/action_pb2_grpc.py | 40 ++++++++ mavsdk/info.py | 40 +++++++- mavsdk/info_pb2.py | 32 +++--- proto | 2 +- 7 files changed, 232 insertions(+), 115 deletions(-) diff --git a/MAVSDK_SERVER_VERSION b/MAVSDK_SERVER_VERSION index 873ca0fa..b77e3cc5 100644 --- a/MAVSDK_SERVER_VERSION +++ b/MAVSDK_SERVER_VERSION @@ -1 +1 @@ -v2.7.0 +v2.8.0 diff --git a/mavsdk/action.py b/mavsdk/action.py index dbbdfe49..dee87872 100644 --- a/mavsdk/action.py +++ b/mavsdk/action.py @@ -336,6 +336,31 @@ async def arm(self): raise ActionError(result, "arm()") + async def arm_force(self): + """ + Send command to force-arm the drone without any checks. + + Attention: this is not to be used for normal flying but only bench tests! + + Arming a drone normally causes motors to spin at idle. + Before arming take all safety precautions and stand clear of the drone! + + Raises + ------ + ActionError + If the request fails. The error contains the reason for the failure. + """ + + request = action_pb2.ArmForceRequest() + response = await self._stub.ArmForce(request) + + + result = self._extract_result(response) + + if result.result != ActionResult.Result.SUCCESS: + raise ActionError(result, "arm_force()") + + async def disarm(self): """ Send command to disarm the drone. diff --git a/mavsdk/action_pb2.py b/mavsdk/action_pb2.py index ace5bb2d..799d4a52 100644 --- a/mavsdk/action_pb2.py +++ b/mavsdk/action_pb2.py @@ -16,7 +16,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x61\x63tion/action.proto\x12\x11mavsdk.rpc.action\x1a\x14mavsdk_options.proto\"\x0c\n\nArmRequest\"E\n\x0b\x41rmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rDisarmRequest\"H\n\x0e\x44isarmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x10\n\x0eTakeoffRequest\"I\n\x0fTakeoffResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bLandRequest\"F\n\x0cLandResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rRebootRequest\"H\n\x0eRebootResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x11\n\x0fShutdownRequest\"J\n\x10ShutdownResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x12\n\x10TerminateRequest\"K\n\x11TerminateResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bKillRequest\"F\n\x0cKillResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x17\n\x15ReturnToLaunchRequest\"P\n\x16ReturnToLaunchResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"p\n\x13GotoLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"N\n\x14GotoLocationResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xd7\x01\n\x0e\x44oOrbitRequest\x12\x10\n\x08radius_m\x18\x01 \x01(\x02\x12\x13\n\x0bvelocity_ms\x18\x02 \x01(\x02\x12\x39\n\x0cyaw_behavior\x18\x03 \x01(\x0e\x32#.mavsdk.rpc.action.OrbitYawBehavior\x12\x1d\n\x0clatitude_deg\x18\x05 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x06 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x07 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"I\n\x0f\x44oOrbitResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bHoldRequest\"F\n\x0cHoldResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"2\n\x12SetActuatorRequest\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x02\"M\n\x13SetActuatorResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1e\n\x1cTransitionToFixedwingRequest\"W\n\x1dTransitionToFixedwingResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\" \n\x1eTransitionToMulticopterRequest\"Y\n\x1fTransitionToMulticopterResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1b\n\x19GetTakeoffAltitudeRequest\"f\n\x1aGetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x10\n\x08\x61ltitude\x18\x02 \x01(\x02\"-\n\x19SetTakeoffAltitudeRequest\x12\x10\n\x08\x61ltitude\x18\x01 \x01(\x02\"T\n\x1aSetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x18\n\x16GetMaximumSpeedRequest\"`\n\x17GetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\r\n\x05speed\x18\x02 \x01(\x02\"\'\n\x16SetMaximumSpeedRequest\x12\r\n\x05speed\x18\x01 \x01(\x02\"Q\n\x17SetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\"\n GetReturnToLaunchAltitudeRequest\"x\n!GetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x1b\n\x13relative_altitude_m\x18\x02 \x01(\x02\"?\n SetReturnToLaunchAltitudeRequest\x12\x1b\n\x13relative_altitude_m\x18\x01 \x01(\x02\"[\n!SetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"+\n\x16SetCurrentSpeedRequest\x12\x11\n\tspeed_m_s\x18\x01 \x01(\x02\"Q\n\x17SetCurrentSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x8d\x04\n\x0c\x41\x63tionResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.action.ActionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xb0\x03\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12.\n*RESULT_COMMAND_DENIED_LANDED_STATE_UNKNOWN\x10\x06\x12$\n RESULT_COMMAND_DENIED_NOT_LANDED\x10\x07\x12\x12\n\x0eRESULT_TIMEOUT\x10\x08\x12*\n&RESULT_VTOL_TRANSITION_SUPPORT_UNKNOWN\x10\t\x12%\n!RESULT_NO_VTOL_TRANSITION_SUPPORT\x10\n\x12\x1a\n\x16RESULT_PARAMETER_ERROR\x10\x0b\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x0c\x12\x11\n\rRESULT_FAILED\x10\r\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x0e*\xf3\x01\n\x10OrbitYawBehavior\x12\x32\n.ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TO_CIRCLE_CENTER\x10\x00\x12+\n\'ORBIT_YAW_BEHAVIOR_HOLD_INITIAL_HEADING\x10\x01\x12#\n\x1fORBIT_YAW_BEHAVIOR_UNCONTROLLED\x10\x02\x12\x33\n/ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TANGENT_TO_CIRCLE\x10\x03\x12$\n ORBIT_YAW_BEHAVIOR_RC_CONTROLLED\x10\x04\x32\xa6\x11\n\rActionService\x12\x46\n\x03\x41rm\x12\x1d.mavsdk.rpc.action.ArmRequest\x1a\x1e.mavsdk.rpc.action.ArmResponse\"\x00\x12O\n\x06\x44isarm\x12 .mavsdk.rpc.action.DisarmRequest\x1a!.mavsdk.rpc.action.DisarmResponse\"\x00\x12R\n\x07Takeoff\x12!.mavsdk.rpc.action.TakeoffRequest\x1a\".mavsdk.rpc.action.TakeoffResponse\"\x00\x12I\n\x04Land\x12\x1e.mavsdk.rpc.action.LandRequest\x1a\x1f.mavsdk.rpc.action.LandResponse\"\x00\x12O\n\x06Reboot\x12 .mavsdk.rpc.action.RebootRequest\x1a!.mavsdk.rpc.action.RebootResponse\"\x00\x12U\n\x08Shutdown\x12\".mavsdk.rpc.action.ShutdownRequest\x1a#.mavsdk.rpc.action.ShutdownResponse\"\x00\x12X\n\tTerminate\x12#.mavsdk.rpc.action.TerminateRequest\x1a$.mavsdk.rpc.action.TerminateResponse\"\x00\x12I\n\x04Kill\x12\x1e.mavsdk.rpc.action.KillRequest\x1a\x1f.mavsdk.rpc.action.KillResponse\"\x00\x12g\n\x0eReturnToLaunch\x12(.mavsdk.rpc.action.ReturnToLaunchRequest\x1a).mavsdk.rpc.action.ReturnToLaunchResponse\"\x00\x12\x61\n\x0cGotoLocation\x12&.mavsdk.rpc.action.GotoLocationRequest\x1a\'.mavsdk.rpc.action.GotoLocationResponse\"\x00\x12R\n\x07\x44oOrbit\x12!.mavsdk.rpc.action.DoOrbitRequest\x1a\".mavsdk.rpc.action.DoOrbitResponse\"\x00\x12I\n\x04Hold\x12\x1e.mavsdk.rpc.action.HoldRequest\x1a\x1f.mavsdk.rpc.action.HoldResponse\"\x00\x12^\n\x0bSetActuator\x12%.mavsdk.rpc.action.SetActuatorRequest\x1a&.mavsdk.rpc.action.SetActuatorResponse\"\x00\x12|\n\x15TransitionToFixedwing\x12/.mavsdk.rpc.action.TransitionToFixedwingRequest\x1a\x30.mavsdk.rpc.action.TransitionToFixedwingResponse\"\x00\x12\x82\x01\n\x17TransitionToMulticopter\x12\x31.mavsdk.rpc.action.TransitionToMulticopterRequest\x1a\x32.mavsdk.rpc.action.TransitionToMulticopterResponse\"\x00\x12s\n\x12GetTakeoffAltitude\x12,.mavsdk.rpc.action.GetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.GetTakeoffAltitudeResponse\"\x00\x12s\n\x12SetTakeoffAltitude\x12,.mavsdk.rpc.action.SetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.SetTakeoffAltitudeResponse\"\x00\x12j\n\x0fGetMaximumSpeed\x12).mavsdk.rpc.action.GetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.GetMaximumSpeedResponse\"\x00\x12j\n\x0fSetMaximumSpeed\x12).mavsdk.rpc.action.SetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.SetMaximumSpeedResponse\"\x00\x12\x88\x01\n\x19GetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.GetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.GetReturnToLaunchAltitudeResponse\"\x00\x12\x88\x01\n\x19SetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.SetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.SetReturnToLaunchAltitudeResponse\"\x00\x12j\n\x0fSetCurrentSpeed\x12).mavsdk.rpc.action.SetCurrentSpeedRequest\x1a*.mavsdk.rpc.action.SetCurrentSpeedResponse\"\x00\x42\x1f\n\x10io.mavsdk.actionB\x0b\x41\x63tionProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x61\x63tion/action.proto\x12\x11mavsdk.rpc.action\x1a\x14mavsdk_options.proto\"\x0c\n\nArmRequest\"E\n\x0b\x41rmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x11\n\x0f\x41rmForceRequest\"J\n\x10\x41rmForceResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rDisarmRequest\"H\n\x0e\x44isarmResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x10\n\x0eTakeoffRequest\"I\n\x0fTakeoffResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bLandRequest\"F\n\x0cLandResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x0f\n\rRebootRequest\"H\n\x0eRebootResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x11\n\x0fShutdownRequest\"J\n\x10ShutdownResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x12\n\x10TerminateRequest\"K\n\x11TerminateResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bKillRequest\"F\n\x0cKillResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x17\n\x15ReturnToLaunchRequest\"P\n\x16ReturnToLaunchResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"p\n\x13GotoLocationRequest\x12\x14\n\x0clatitude_deg\x18\x01 \x01(\x01\x12\x15\n\rlongitude_deg\x18\x02 \x01(\x01\x12\x1b\n\x13\x61\x62solute_altitude_m\x18\x03 \x01(\x02\x12\x0f\n\x07yaw_deg\x18\x04 \x01(\x02\"N\n\x14GotoLocationResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\xd7\x01\n\x0e\x44oOrbitRequest\x12\x10\n\x08radius_m\x18\x01 \x01(\x02\x12\x13\n\x0bvelocity_ms\x18\x02 \x01(\x02\x12\x39\n\x0cyaw_behavior\x18\x03 \x01(\x0e\x32#.mavsdk.rpc.action.OrbitYawBehavior\x12\x1d\n\x0clatitude_deg\x18\x05 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12\x1e\n\rlongitude_deg\x18\x06 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\x12$\n\x13\x61\x62solute_altitude_m\x18\x07 \x01(\x01\x42\x07\x82\xb5\x18\x03NaN\"I\n\x0f\x44oOrbitResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\r\n\x0bHoldRequest\"F\n\x0cHoldResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"2\n\x12SetActuatorRequest\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x02\"M\n\x13SetActuatorResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1e\n\x1cTransitionToFixedwingRequest\"W\n\x1dTransitionToFixedwingResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\" \n\x1eTransitionToMulticopterRequest\"Y\n\x1fTransitionToMulticopterResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x1b\n\x19GetTakeoffAltitudeRequest\"f\n\x1aGetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x10\n\x08\x61ltitude\x18\x02 \x01(\x02\"-\n\x19SetTakeoffAltitudeRequest\x12\x10\n\x08\x61ltitude\x18\x01 \x01(\x02\"T\n\x1aSetTakeoffAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x18\n\x16GetMaximumSpeedRequest\"`\n\x17GetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\r\n\x05speed\x18\x02 \x01(\x02\"\'\n\x16SetMaximumSpeedRequest\x12\r\n\x05speed\x18\x01 \x01(\x02\"Q\n\x17SetMaximumSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\"\n GetReturnToLaunchAltitudeRequest\"x\n!GetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\x12\x1b\n\x13relative_altitude_m\x18\x02 \x01(\x02\"?\n SetReturnToLaunchAltitudeRequest\x12\x1b\n\x13relative_altitude_m\x18\x01 \x01(\x02\"[\n!SetReturnToLaunchAltitudeResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"+\n\x16SetCurrentSpeedRequest\x12\x11\n\tspeed_m_s\x18\x01 \x01(\x02\"Q\n\x17SetCurrentSpeedResponse\x12\x36\n\raction_result\x18\x01 \x01(\x0b\x32\x1f.mavsdk.rpc.action.ActionResult\"\x8d\x04\n\x0c\x41\x63tionResult\x12\x36\n\x06result\x18\x01 \x01(\x0e\x32&.mavsdk.rpc.action.ActionResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"\xb0\x03\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x02\x12\x1b\n\x17RESULT_CONNECTION_ERROR\x10\x03\x12\x0f\n\x0bRESULT_BUSY\x10\x04\x12\x19\n\x15RESULT_COMMAND_DENIED\x10\x05\x12.\n*RESULT_COMMAND_DENIED_LANDED_STATE_UNKNOWN\x10\x06\x12$\n RESULT_COMMAND_DENIED_NOT_LANDED\x10\x07\x12\x12\n\x0eRESULT_TIMEOUT\x10\x08\x12*\n&RESULT_VTOL_TRANSITION_SUPPORT_UNKNOWN\x10\t\x12%\n!RESULT_NO_VTOL_TRANSITION_SUPPORT\x10\n\x12\x1a\n\x16RESULT_PARAMETER_ERROR\x10\x0b\x12\x16\n\x12RESULT_UNSUPPORTED\x10\x0c\x12\x11\n\rRESULT_FAILED\x10\r\x12\x1b\n\x17RESULT_INVALID_ARGUMENT\x10\x0e*\xf3\x01\n\x10OrbitYawBehavior\x12\x32\n.ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TO_CIRCLE_CENTER\x10\x00\x12+\n\'ORBIT_YAW_BEHAVIOR_HOLD_INITIAL_HEADING\x10\x01\x12#\n\x1fORBIT_YAW_BEHAVIOR_UNCONTROLLED\x10\x02\x12\x33\n/ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TANGENT_TO_CIRCLE\x10\x03\x12$\n ORBIT_YAW_BEHAVIOR_RC_CONTROLLED\x10\x04\x32\xfd\x11\n\rActionService\x12\x46\n\x03\x41rm\x12\x1d.mavsdk.rpc.action.ArmRequest\x1a\x1e.mavsdk.rpc.action.ArmResponse\"\x00\x12U\n\x08\x41rmForce\x12\".mavsdk.rpc.action.ArmForceRequest\x1a#.mavsdk.rpc.action.ArmForceResponse\"\x00\x12O\n\x06\x44isarm\x12 .mavsdk.rpc.action.DisarmRequest\x1a!.mavsdk.rpc.action.DisarmResponse\"\x00\x12R\n\x07Takeoff\x12!.mavsdk.rpc.action.TakeoffRequest\x1a\".mavsdk.rpc.action.TakeoffResponse\"\x00\x12I\n\x04Land\x12\x1e.mavsdk.rpc.action.LandRequest\x1a\x1f.mavsdk.rpc.action.LandResponse\"\x00\x12O\n\x06Reboot\x12 .mavsdk.rpc.action.RebootRequest\x1a!.mavsdk.rpc.action.RebootResponse\"\x00\x12U\n\x08Shutdown\x12\".mavsdk.rpc.action.ShutdownRequest\x1a#.mavsdk.rpc.action.ShutdownResponse\"\x00\x12X\n\tTerminate\x12#.mavsdk.rpc.action.TerminateRequest\x1a$.mavsdk.rpc.action.TerminateResponse\"\x00\x12I\n\x04Kill\x12\x1e.mavsdk.rpc.action.KillRequest\x1a\x1f.mavsdk.rpc.action.KillResponse\"\x00\x12g\n\x0eReturnToLaunch\x12(.mavsdk.rpc.action.ReturnToLaunchRequest\x1a).mavsdk.rpc.action.ReturnToLaunchResponse\"\x00\x12\x61\n\x0cGotoLocation\x12&.mavsdk.rpc.action.GotoLocationRequest\x1a\'.mavsdk.rpc.action.GotoLocationResponse\"\x00\x12R\n\x07\x44oOrbit\x12!.mavsdk.rpc.action.DoOrbitRequest\x1a\".mavsdk.rpc.action.DoOrbitResponse\"\x00\x12I\n\x04Hold\x12\x1e.mavsdk.rpc.action.HoldRequest\x1a\x1f.mavsdk.rpc.action.HoldResponse\"\x00\x12^\n\x0bSetActuator\x12%.mavsdk.rpc.action.SetActuatorRequest\x1a&.mavsdk.rpc.action.SetActuatorResponse\"\x00\x12|\n\x15TransitionToFixedwing\x12/.mavsdk.rpc.action.TransitionToFixedwingRequest\x1a\x30.mavsdk.rpc.action.TransitionToFixedwingResponse\"\x00\x12\x82\x01\n\x17TransitionToMulticopter\x12\x31.mavsdk.rpc.action.TransitionToMulticopterRequest\x1a\x32.mavsdk.rpc.action.TransitionToMulticopterResponse\"\x00\x12s\n\x12GetTakeoffAltitude\x12,.mavsdk.rpc.action.GetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.GetTakeoffAltitudeResponse\"\x00\x12s\n\x12SetTakeoffAltitude\x12,.mavsdk.rpc.action.SetTakeoffAltitudeRequest\x1a-.mavsdk.rpc.action.SetTakeoffAltitudeResponse\"\x00\x12j\n\x0fGetMaximumSpeed\x12).mavsdk.rpc.action.GetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.GetMaximumSpeedResponse\"\x00\x12j\n\x0fSetMaximumSpeed\x12).mavsdk.rpc.action.SetMaximumSpeedRequest\x1a*.mavsdk.rpc.action.SetMaximumSpeedResponse\"\x00\x12\x88\x01\n\x19GetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.GetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.GetReturnToLaunchAltitudeResponse\"\x00\x12\x88\x01\n\x19SetReturnToLaunchAltitude\x12\x33.mavsdk.rpc.action.SetReturnToLaunchAltitudeRequest\x1a\x34.mavsdk.rpc.action.SetReturnToLaunchAltitudeResponse\"\x00\x12j\n\x0fSetCurrentSpeed\x12).mavsdk.rpc.action.SetCurrentSpeedRequest\x1a*.mavsdk.rpc.action.SetCurrentSpeedResponse\"\x00\x42\x1f\n\x10io.mavsdk.actionB\x0b\x41\x63tionProtob\x06proto3') _ORBITYAWBEHAVIOR = DESCRIPTOR.enum_types_by_name['OrbitYawBehavior'] OrbitYawBehavior = enum_type_wrapper.EnumTypeWrapper(_ORBITYAWBEHAVIOR) @@ -29,6 +29,8 @@ _ARMREQUEST = DESCRIPTOR.message_types_by_name['ArmRequest'] _ARMRESPONSE = DESCRIPTOR.message_types_by_name['ArmResponse'] +_ARMFORCEREQUEST = DESCRIPTOR.message_types_by_name['ArmForceRequest'] +_ARMFORCERESPONSE = DESCRIPTOR.message_types_by_name['ArmForceResponse'] _DISARMREQUEST = DESCRIPTOR.message_types_by_name['DisarmRequest'] _DISARMRESPONSE = DESCRIPTOR.message_types_by_name['DisarmResponse'] _TAKEOFFREQUEST = DESCRIPTOR.message_types_by_name['TakeoffRequest'] @@ -87,6 +89,20 @@ }) _sym_db.RegisterMessage(ArmResponse) +ArmForceRequest = _reflection.GeneratedProtocolMessageType('ArmForceRequest', (_message.Message,), { + 'DESCRIPTOR' : _ARMFORCEREQUEST, + '__module__' : 'action.action_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.action.ArmForceRequest) + }) +_sym_db.RegisterMessage(ArmForceRequest) + +ArmForceResponse = _reflection.GeneratedProtocolMessageType('ArmForceResponse', (_message.Message,), { + 'DESCRIPTOR' : _ARMFORCERESPONSE, + '__module__' : 'action.action_pb2' + # @@protoc_insertion_point(class_scope:mavsdk.rpc.action.ArmForceResponse) + }) +_sym_db.RegisterMessage(ArmForceResponse) + DisarmRequest = _reflection.GeneratedProtocolMessageType('DisarmRequest', (_message.Message,), { 'DESCRIPTOR' : _DISARMREQUEST, '__module__' : 'action.action_pb2' @@ -399,100 +415,104 @@ _DOORBITREQUEST.fields_by_name['longitude_deg']._serialized_options = b'\202\265\030\003NaN' _DOORBITREQUEST.fields_by_name['absolute_altitude_m']._options = None _DOORBITREQUEST.fields_by_name['absolute_altitude_m']._serialized_options = b'\202\265\030\003NaN' - _ORBITYAWBEHAVIOR._serialized_start=3335 - _ORBITYAWBEHAVIOR._serialized_end=3578 + _ORBITYAWBEHAVIOR._serialized_start=3430 + _ORBITYAWBEHAVIOR._serialized_end=3673 _ARMREQUEST._serialized_start=64 _ARMREQUEST._serialized_end=76 _ARMRESPONSE._serialized_start=78 _ARMRESPONSE._serialized_end=147 - _DISARMREQUEST._serialized_start=149 - _DISARMREQUEST._serialized_end=164 - _DISARMRESPONSE._serialized_start=166 - _DISARMRESPONSE._serialized_end=238 - _TAKEOFFREQUEST._serialized_start=240 - _TAKEOFFREQUEST._serialized_end=256 - _TAKEOFFRESPONSE._serialized_start=258 - _TAKEOFFRESPONSE._serialized_end=331 - _LANDREQUEST._serialized_start=333 - _LANDREQUEST._serialized_end=346 - _LANDRESPONSE._serialized_start=348 - _LANDRESPONSE._serialized_end=418 - _REBOOTREQUEST._serialized_start=420 - _REBOOTREQUEST._serialized_end=435 - _REBOOTRESPONSE._serialized_start=437 - _REBOOTRESPONSE._serialized_end=509 - _SHUTDOWNREQUEST._serialized_start=511 - _SHUTDOWNREQUEST._serialized_end=528 - _SHUTDOWNRESPONSE._serialized_start=530 - _SHUTDOWNRESPONSE._serialized_end=604 - _TERMINATEREQUEST._serialized_start=606 - _TERMINATEREQUEST._serialized_end=624 - _TERMINATERESPONSE._serialized_start=626 - _TERMINATERESPONSE._serialized_end=701 - _KILLREQUEST._serialized_start=703 - _KILLREQUEST._serialized_end=716 - _KILLRESPONSE._serialized_start=718 - _KILLRESPONSE._serialized_end=788 - _RETURNTOLAUNCHREQUEST._serialized_start=790 - _RETURNTOLAUNCHREQUEST._serialized_end=813 - _RETURNTOLAUNCHRESPONSE._serialized_start=815 - _RETURNTOLAUNCHRESPONSE._serialized_end=895 - _GOTOLOCATIONREQUEST._serialized_start=897 - _GOTOLOCATIONREQUEST._serialized_end=1009 - _GOTOLOCATIONRESPONSE._serialized_start=1011 - _GOTOLOCATIONRESPONSE._serialized_end=1089 - _DOORBITREQUEST._serialized_start=1092 - _DOORBITREQUEST._serialized_end=1307 - _DOORBITRESPONSE._serialized_start=1309 - _DOORBITRESPONSE._serialized_end=1382 - _HOLDREQUEST._serialized_start=1384 - _HOLDREQUEST._serialized_end=1397 - _HOLDRESPONSE._serialized_start=1399 - _HOLDRESPONSE._serialized_end=1469 - _SETACTUATORREQUEST._serialized_start=1471 - _SETACTUATORREQUEST._serialized_end=1521 - _SETACTUATORRESPONSE._serialized_start=1523 - _SETACTUATORRESPONSE._serialized_end=1600 - _TRANSITIONTOFIXEDWINGREQUEST._serialized_start=1602 - _TRANSITIONTOFIXEDWINGREQUEST._serialized_end=1632 - _TRANSITIONTOFIXEDWINGRESPONSE._serialized_start=1634 - _TRANSITIONTOFIXEDWINGRESPONSE._serialized_end=1721 - _TRANSITIONTOMULTICOPTERREQUEST._serialized_start=1723 - _TRANSITIONTOMULTICOPTERREQUEST._serialized_end=1755 - _TRANSITIONTOMULTICOPTERRESPONSE._serialized_start=1757 - _TRANSITIONTOMULTICOPTERRESPONSE._serialized_end=1846 - _GETTAKEOFFALTITUDEREQUEST._serialized_start=1848 - _GETTAKEOFFALTITUDEREQUEST._serialized_end=1875 - _GETTAKEOFFALTITUDERESPONSE._serialized_start=1877 - _GETTAKEOFFALTITUDERESPONSE._serialized_end=1979 - _SETTAKEOFFALTITUDEREQUEST._serialized_start=1981 - _SETTAKEOFFALTITUDEREQUEST._serialized_end=2026 - _SETTAKEOFFALTITUDERESPONSE._serialized_start=2028 - _SETTAKEOFFALTITUDERESPONSE._serialized_end=2112 - _GETMAXIMUMSPEEDREQUEST._serialized_start=2114 - _GETMAXIMUMSPEEDREQUEST._serialized_end=2138 - _GETMAXIMUMSPEEDRESPONSE._serialized_start=2140 - _GETMAXIMUMSPEEDRESPONSE._serialized_end=2236 - _SETMAXIMUMSPEEDREQUEST._serialized_start=2238 - _SETMAXIMUMSPEEDREQUEST._serialized_end=2277 - _SETMAXIMUMSPEEDRESPONSE._serialized_start=2279 - _SETMAXIMUMSPEEDRESPONSE._serialized_end=2360 - _GETRETURNTOLAUNCHALTITUDEREQUEST._serialized_start=2362 - _GETRETURNTOLAUNCHALTITUDEREQUEST._serialized_end=2396 - _GETRETURNTOLAUNCHALTITUDERESPONSE._serialized_start=2398 - _GETRETURNTOLAUNCHALTITUDERESPONSE._serialized_end=2518 - _SETRETURNTOLAUNCHALTITUDEREQUEST._serialized_start=2520 - _SETRETURNTOLAUNCHALTITUDEREQUEST._serialized_end=2583 - _SETRETURNTOLAUNCHALTITUDERESPONSE._serialized_start=2585 - _SETRETURNTOLAUNCHALTITUDERESPONSE._serialized_end=2676 - _SETCURRENTSPEEDREQUEST._serialized_start=2678 - _SETCURRENTSPEEDREQUEST._serialized_end=2721 - _SETCURRENTSPEEDRESPONSE._serialized_start=2723 - _SETCURRENTSPEEDRESPONSE._serialized_end=2804 - _ACTIONRESULT._serialized_start=2807 - _ACTIONRESULT._serialized_end=3332 - _ACTIONRESULT_RESULT._serialized_start=2900 - _ACTIONRESULT_RESULT._serialized_end=3332 - _ACTIONSERVICE._serialized_start=3581 - _ACTIONSERVICE._serialized_end=5795 + _ARMFORCEREQUEST._serialized_start=149 + _ARMFORCEREQUEST._serialized_end=166 + _ARMFORCERESPONSE._serialized_start=168 + _ARMFORCERESPONSE._serialized_end=242 + _DISARMREQUEST._serialized_start=244 + _DISARMREQUEST._serialized_end=259 + _DISARMRESPONSE._serialized_start=261 + _DISARMRESPONSE._serialized_end=333 + _TAKEOFFREQUEST._serialized_start=335 + _TAKEOFFREQUEST._serialized_end=351 + _TAKEOFFRESPONSE._serialized_start=353 + _TAKEOFFRESPONSE._serialized_end=426 + _LANDREQUEST._serialized_start=428 + _LANDREQUEST._serialized_end=441 + _LANDRESPONSE._serialized_start=443 + _LANDRESPONSE._serialized_end=513 + _REBOOTREQUEST._serialized_start=515 + _REBOOTREQUEST._serialized_end=530 + _REBOOTRESPONSE._serialized_start=532 + _REBOOTRESPONSE._serialized_end=604 + _SHUTDOWNREQUEST._serialized_start=606 + _SHUTDOWNREQUEST._serialized_end=623 + _SHUTDOWNRESPONSE._serialized_start=625 + _SHUTDOWNRESPONSE._serialized_end=699 + _TERMINATEREQUEST._serialized_start=701 + _TERMINATEREQUEST._serialized_end=719 + _TERMINATERESPONSE._serialized_start=721 + _TERMINATERESPONSE._serialized_end=796 + _KILLREQUEST._serialized_start=798 + _KILLREQUEST._serialized_end=811 + _KILLRESPONSE._serialized_start=813 + _KILLRESPONSE._serialized_end=883 + _RETURNTOLAUNCHREQUEST._serialized_start=885 + _RETURNTOLAUNCHREQUEST._serialized_end=908 + _RETURNTOLAUNCHRESPONSE._serialized_start=910 + _RETURNTOLAUNCHRESPONSE._serialized_end=990 + _GOTOLOCATIONREQUEST._serialized_start=992 + _GOTOLOCATIONREQUEST._serialized_end=1104 + _GOTOLOCATIONRESPONSE._serialized_start=1106 + _GOTOLOCATIONRESPONSE._serialized_end=1184 + _DOORBITREQUEST._serialized_start=1187 + _DOORBITREQUEST._serialized_end=1402 + _DOORBITRESPONSE._serialized_start=1404 + _DOORBITRESPONSE._serialized_end=1477 + _HOLDREQUEST._serialized_start=1479 + _HOLDREQUEST._serialized_end=1492 + _HOLDRESPONSE._serialized_start=1494 + _HOLDRESPONSE._serialized_end=1564 + _SETACTUATORREQUEST._serialized_start=1566 + _SETACTUATORREQUEST._serialized_end=1616 + _SETACTUATORRESPONSE._serialized_start=1618 + _SETACTUATORRESPONSE._serialized_end=1695 + _TRANSITIONTOFIXEDWINGREQUEST._serialized_start=1697 + _TRANSITIONTOFIXEDWINGREQUEST._serialized_end=1727 + _TRANSITIONTOFIXEDWINGRESPONSE._serialized_start=1729 + _TRANSITIONTOFIXEDWINGRESPONSE._serialized_end=1816 + _TRANSITIONTOMULTICOPTERREQUEST._serialized_start=1818 + _TRANSITIONTOMULTICOPTERREQUEST._serialized_end=1850 + _TRANSITIONTOMULTICOPTERRESPONSE._serialized_start=1852 + _TRANSITIONTOMULTICOPTERRESPONSE._serialized_end=1941 + _GETTAKEOFFALTITUDEREQUEST._serialized_start=1943 + _GETTAKEOFFALTITUDEREQUEST._serialized_end=1970 + _GETTAKEOFFALTITUDERESPONSE._serialized_start=1972 + _GETTAKEOFFALTITUDERESPONSE._serialized_end=2074 + _SETTAKEOFFALTITUDEREQUEST._serialized_start=2076 + _SETTAKEOFFALTITUDEREQUEST._serialized_end=2121 + _SETTAKEOFFALTITUDERESPONSE._serialized_start=2123 + _SETTAKEOFFALTITUDERESPONSE._serialized_end=2207 + _GETMAXIMUMSPEEDREQUEST._serialized_start=2209 + _GETMAXIMUMSPEEDREQUEST._serialized_end=2233 + _GETMAXIMUMSPEEDRESPONSE._serialized_start=2235 + _GETMAXIMUMSPEEDRESPONSE._serialized_end=2331 + _SETMAXIMUMSPEEDREQUEST._serialized_start=2333 + _SETMAXIMUMSPEEDREQUEST._serialized_end=2372 + _SETMAXIMUMSPEEDRESPONSE._serialized_start=2374 + _SETMAXIMUMSPEEDRESPONSE._serialized_end=2455 + _GETRETURNTOLAUNCHALTITUDEREQUEST._serialized_start=2457 + _GETRETURNTOLAUNCHALTITUDEREQUEST._serialized_end=2491 + _GETRETURNTOLAUNCHALTITUDERESPONSE._serialized_start=2493 + _GETRETURNTOLAUNCHALTITUDERESPONSE._serialized_end=2613 + _SETRETURNTOLAUNCHALTITUDEREQUEST._serialized_start=2615 + _SETRETURNTOLAUNCHALTITUDEREQUEST._serialized_end=2678 + _SETRETURNTOLAUNCHALTITUDERESPONSE._serialized_start=2680 + _SETRETURNTOLAUNCHALTITUDERESPONSE._serialized_end=2771 + _SETCURRENTSPEEDREQUEST._serialized_start=2773 + _SETCURRENTSPEEDREQUEST._serialized_end=2816 + _SETCURRENTSPEEDRESPONSE._serialized_start=2818 + _SETCURRENTSPEEDRESPONSE._serialized_end=2899 + _ACTIONRESULT._serialized_start=2902 + _ACTIONRESULT._serialized_end=3427 + _ACTIONRESULT_RESULT._serialized_start=2995 + _ACTIONRESULT_RESULT._serialized_end=3427 + _ACTIONSERVICE._serialized_start=3676 + _ACTIONSERVICE._serialized_end=5977 # @@protoc_insertion_point(module_scope) diff --git a/mavsdk/action_pb2_grpc.py b/mavsdk/action_pb2_grpc.py index 29364582..df68ade4 100644 --- a/mavsdk/action_pb2_grpc.py +++ b/mavsdk/action_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=action_dot_action__pb2.ArmRequest.SerializeToString, response_deserializer=action_dot_action__pb2.ArmResponse.FromString, ) + self.ArmForce = channel.unary_unary( + '/mavsdk.rpc.action.ActionService/ArmForce', + request_serializer=action_dot_action__pb2.ArmForceRequest.SerializeToString, + response_deserializer=action_dot_action__pb2.ArmForceResponse.FromString, + ) self.Disarm = channel.unary_unary( '/mavsdk.rpc.action.ActionService/Disarm', request_serializer=action_dot_action__pb2.DisarmRequest.SerializeToString, @@ -142,6 +147,19 @@ def Arm(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def ArmForce(self, request, context): + """ + Send command to force-arm the drone without any checks. + + Attention: this is not to be used for normal flying but only bench tests! + + Arming a drone normally causes motors to spin at idle. + Before arming take all safety precautions and stand clear of the drone! + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Disarm(self, request, context): """ Send command to disarm the drone. @@ -369,6 +387,11 @@ def add_ActionServiceServicer_to_server(servicer, server): request_deserializer=action_dot_action__pb2.ArmRequest.FromString, response_serializer=action_dot_action__pb2.ArmResponse.SerializeToString, ), + 'ArmForce': grpc.unary_unary_rpc_method_handler( + servicer.ArmForce, + request_deserializer=action_dot_action__pb2.ArmForceRequest.FromString, + response_serializer=action_dot_action__pb2.ArmForceResponse.SerializeToString, + ), 'Disarm': grpc.unary_unary_rpc_method_handler( servicer.Disarm, request_deserializer=action_dot_action__pb2.DisarmRequest.FromString, @@ -502,6 +525,23 @@ def Arm(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def ArmForce(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/mavsdk.rpc.action.ActionService/ArmForce', + action_dot_action__pb2.ArmForceRequest.SerializeToString, + action_dot_action__pb2.ArmForceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Disarm(request, target, diff --git a/mavsdk/info.py b/mavsdk/info.py index da4e693c..a030fed6 100644 --- a/mavsdk/info.py +++ b/mavsdk/info.py @@ -18,6 +18,12 @@ class FlightInfo: flight_uid : uint64_t Flight counter. Starts from zero, is incremented at every disarm and is never reset (even after reboot) + duration_since_arming_ms : uint32_t + Duration since arming in milliseconds + + duration_since_takeoff_ms : uint32_t + Duration since takeoff in milliseconds + """ @@ -25,10 +31,14 @@ class FlightInfo: def __init__( self, time_boot_ms, - flight_uid): + flight_uid, + duration_since_arming_ms, + duration_since_takeoff_ms): """ Initializes the FlightInfo object """ self.time_boot_ms = time_boot_ms self.flight_uid = flight_uid + self.duration_since_arming_ms = duration_since_arming_ms + self.duration_since_takeoff_ms = duration_since_takeoff_ms def __eq__(self, to_compare): """ Checks if two FlightInfo are the same """ @@ -37,7 +47,9 @@ def __eq__(self, to_compare): # FlightInfo object return \ (self.time_boot_ms == to_compare.time_boot_ms) and \ - (self.flight_uid == to_compare.flight_uid) + (self.flight_uid == to_compare.flight_uid) and \ + (self.duration_since_arming_ms == to_compare.duration_since_arming_ms) and \ + (self.duration_since_takeoff_ms == to_compare.duration_since_takeoff_ms) except AttributeError: return False @@ -46,7 +58,9 @@ def __str__(self): """ FlightInfo in string representation """ struct_repr = ", ".join([ "time_boot_ms: " + str(self.time_boot_ms), - "flight_uid: " + str(self.flight_uid) + "flight_uid: " + str(self.flight_uid), + "duration_since_arming_ms: " + str(self.duration_since_arming_ms), + "duration_since_takeoff_ms: " + str(self.duration_since_takeoff_ms) ]) return f"FlightInfo: [{struct_repr}]" @@ -59,7 +73,13 @@ def translate_from_rpc(rpcFlightInfo): rpcFlightInfo.time_boot_ms, - rpcFlightInfo.flight_uid + rpcFlightInfo.flight_uid, + + + rpcFlightInfo.duration_since_arming_ms, + + + rpcFlightInfo.duration_since_takeoff_ms ) def translate_to_rpc(self, rpcFlightInfo): @@ -78,6 +98,18 @@ def translate_to_rpc(self, rpcFlightInfo): + + + rpcFlightInfo.duration_since_arming_ms = self.duration_since_arming_ms + + + + + + rpcFlightInfo.duration_since_takeoff_ms = self.duration_since_takeoff_ms + + + class Identification: diff --git a/mavsdk/info_pb2.py b/mavsdk/info_pb2.py index 12cb4046..20d98828 100644 --- a/mavsdk/info_pb2.py +++ b/mavsdk/info_pb2.py @@ -15,7 +15,7 @@ from . import mavsdk_options_pb2 as mavsdk__options__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finfo/info.proto\x12\x0fmavsdk.rpc.info\x1a\x14mavsdk_options.proto\"\x1d\n\x1bGetFlightInformationRequest\"\x82\x01\n\x1cGetFlightInformationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x30\n\x0b\x66light_info\x18\x02 \x01(\x0b\x32\x1b.mavsdk.rpc.info.FlightInfo\"\x1a\n\x18GetIdentificationRequest\"\x86\x01\n\x19GetIdentificationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x37\n\x0eidentification\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.info.Identification\"\x13\n\x11GetProductRequest\"q\n\x12GetProductResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07product\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Product\"\x13\n\x11GetVersionRequest\"q\n\x12GetVersionResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07version\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Version\"\x17\n\x15GetSpeedFactorRequest\"`\n\x16GetSpeedFactorResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x14\n\x0cspeed_factor\x18\x02 \x01(\x01\"6\n\nFlightInfo\x12\x14\n\x0ctime_boot_ms\x18\x01 \x01(\r\x12\x12\n\nflight_uid\x18\x02 \x01(\x04\":\n\x0eIdentification\x12\x14\n\x0chardware_uid\x18\x01 \x01(\t\x12\x12\n\nlegacy_uid\x18\x02 \x01(\x04\"[\n\x07Product\x12\x11\n\tvendor_id\x18\x01 \x01(\x05\x12\x13\n\x0bvendor_name\x18\x02 \x01(\t\x12\x12\n\nproduct_id\x18\x03 \x01(\x05\x12\x14\n\x0cproduct_name\x18\x04 \x01(\t\"\x87\x05\n\x07Version\x12\x17\n\x0f\x66light_sw_major\x18\x01 \x01(\x05\x12\x17\n\x0f\x66light_sw_minor\x18\x02 \x01(\x05\x12\x17\n\x0f\x66light_sw_patch\x18\x03 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_major\x18\x04 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_minor\x18\x05 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_patch\x18\x06 \x01(\x05\x12\x13\n\x0bos_sw_major\x18\x07 \x01(\x05\x12\x13\n\x0bos_sw_minor\x18\x08 \x01(\x05\x12\x13\n\x0bos_sw_patch\x18\t \x01(\x05\x12\x1a\n\x12\x66light_sw_git_hash\x18\n \x01(\t\x12\x16\n\x0eos_sw_git_hash\x18\x0b \x01(\t\x12R\n\x16\x66light_sw_version_type\x18\x0c \x01(\x0e\x32\x32.mavsdk.rpc.info.Version.FlightSoftwareVersionType\"\x89\x02\n\x19\x46lightSoftwareVersionType\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_UNKNOWN\x10\x00\x12$\n FLIGHT_SOFTWARE_VERSION_TYPE_DEV\x10\x01\x12&\n\"FLIGHT_SOFTWARE_VERSION_TYPE_ALPHA\x10\x02\x12%\n!FLIGHT_SOFTWARE_VERSION_TYPE_BETA\x10\x03\x12#\n\x1f\x46LIGHT_SOFTWARE_VERSION_TYPE_RC\x10\x04\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_RELEASE\x10\x05\"\xc5\x01\n\nInfoResult\x12\x32\n\x06result\x18\x01 \x01(\x0e\x32\".mavsdk.rpc.info.InfoResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"o\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\'\n#RESULT_INFORMATION_NOT_RECEIVED_YET\x10\x02\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x03\x32\x9d\x04\n\x0bInfoService\x12y\n\x14GetFlightInformation\x12,.mavsdk.rpc.info.GetFlightInformationRequest\x1a-.mavsdk.rpc.info.GetFlightInformationResponse\"\x04\x80\xb5\x18\x01\x12p\n\x11GetIdentification\x12).mavsdk.rpc.info.GetIdentificationRequest\x1a*.mavsdk.rpc.info.GetIdentificationResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetProduct\x12\".mavsdk.rpc.info.GetProductRequest\x1a#.mavsdk.rpc.info.GetProductResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetVersion\x12\".mavsdk.rpc.info.GetVersionRequest\x1a#.mavsdk.rpc.info.GetVersionResponse\"\x04\x80\xb5\x18\x01\x12g\n\x0eGetSpeedFactor\x12&.mavsdk.rpc.info.GetSpeedFactorRequest\x1a\'.mavsdk.rpc.info.GetSpeedFactorResponse\"\x04\x80\xb5\x18\x01\x42\x1b\n\x0eio.mavsdk.infoB\tInfoProtob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finfo/info.proto\x12\x0fmavsdk.rpc.info\x1a\x14mavsdk_options.proto\"\x1d\n\x1bGetFlightInformationRequest\"\x82\x01\n\x1cGetFlightInformationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x30\n\x0b\x66light_info\x18\x02 \x01(\x0b\x32\x1b.mavsdk.rpc.info.FlightInfo\"\x1a\n\x18GetIdentificationRequest\"\x86\x01\n\x19GetIdentificationResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x37\n\x0eidentification\x18\x02 \x01(\x0b\x32\x1f.mavsdk.rpc.info.Identification\"\x13\n\x11GetProductRequest\"q\n\x12GetProductResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07product\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Product\"\x13\n\x11GetVersionRequest\"q\n\x12GetVersionResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12)\n\x07version\x18\x02 \x01(\x0b\x32\x18.mavsdk.rpc.info.Version\"\x17\n\x15GetSpeedFactorRequest\"`\n\x16GetSpeedFactorResponse\x12\x30\n\x0binfo_result\x18\x01 \x01(\x0b\x32\x1b.mavsdk.rpc.info.InfoResult\x12\x14\n\x0cspeed_factor\x18\x02 \x01(\x01\"{\n\nFlightInfo\x12\x14\n\x0ctime_boot_ms\x18\x01 \x01(\r\x12\x12\n\nflight_uid\x18\x02 \x01(\x04\x12 \n\x18\x64uration_since_arming_ms\x18\x03 \x01(\r\x12!\n\x19\x64uration_since_takeoff_ms\x18\x04 \x01(\r\":\n\x0eIdentification\x12\x14\n\x0chardware_uid\x18\x01 \x01(\t\x12\x12\n\nlegacy_uid\x18\x02 \x01(\x04\"[\n\x07Product\x12\x11\n\tvendor_id\x18\x01 \x01(\x05\x12\x13\n\x0bvendor_name\x18\x02 \x01(\t\x12\x12\n\nproduct_id\x18\x03 \x01(\x05\x12\x14\n\x0cproduct_name\x18\x04 \x01(\t\"\x87\x05\n\x07Version\x12\x17\n\x0f\x66light_sw_major\x18\x01 \x01(\x05\x12\x17\n\x0f\x66light_sw_minor\x18\x02 \x01(\x05\x12\x17\n\x0f\x66light_sw_patch\x18\x03 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_major\x18\x04 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_minor\x18\x05 \x01(\x05\x12\x1e\n\x16\x66light_sw_vendor_patch\x18\x06 \x01(\x05\x12\x13\n\x0bos_sw_major\x18\x07 \x01(\x05\x12\x13\n\x0bos_sw_minor\x18\x08 \x01(\x05\x12\x13\n\x0bos_sw_patch\x18\t \x01(\x05\x12\x1a\n\x12\x66light_sw_git_hash\x18\n \x01(\t\x12\x16\n\x0eos_sw_git_hash\x18\x0b \x01(\t\x12R\n\x16\x66light_sw_version_type\x18\x0c \x01(\x0e\x32\x32.mavsdk.rpc.info.Version.FlightSoftwareVersionType\"\x89\x02\n\x19\x46lightSoftwareVersionType\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_UNKNOWN\x10\x00\x12$\n FLIGHT_SOFTWARE_VERSION_TYPE_DEV\x10\x01\x12&\n\"FLIGHT_SOFTWARE_VERSION_TYPE_ALPHA\x10\x02\x12%\n!FLIGHT_SOFTWARE_VERSION_TYPE_BETA\x10\x03\x12#\n\x1f\x46LIGHT_SOFTWARE_VERSION_TYPE_RC\x10\x04\x12(\n$FLIGHT_SOFTWARE_VERSION_TYPE_RELEASE\x10\x05\"\xc5\x01\n\nInfoResult\x12\x32\n\x06result\x18\x01 \x01(\x0e\x32\".mavsdk.rpc.info.InfoResult.Result\x12\x12\n\nresult_str\x18\x02 \x01(\t\"o\n\x06Result\x12\x12\n\x0eRESULT_UNKNOWN\x10\x00\x12\x12\n\x0eRESULT_SUCCESS\x10\x01\x12\'\n#RESULT_INFORMATION_NOT_RECEIVED_YET\x10\x02\x12\x14\n\x10RESULT_NO_SYSTEM\x10\x03\x32\x9d\x04\n\x0bInfoService\x12y\n\x14GetFlightInformation\x12,.mavsdk.rpc.info.GetFlightInformationRequest\x1a-.mavsdk.rpc.info.GetFlightInformationResponse\"\x04\x80\xb5\x18\x01\x12p\n\x11GetIdentification\x12).mavsdk.rpc.info.GetIdentificationRequest\x1a*.mavsdk.rpc.info.GetIdentificationResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetProduct\x12\".mavsdk.rpc.info.GetProductRequest\x1a#.mavsdk.rpc.info.GetProductResponse\"\x04\x80\xb5\x18\x01\x12[\n\nGetVersion\x12\".mavsdk.rpc.info.GetVersionRequest\x1a#.mavsdk.rpc.info.GetVersionResponse\"\x04\x80\xb5\x18\x01\x12g\n\x0eGetSpeedFactor\x12&.mavsdk.rpc.info.GetSpeedFactorRequest\x1a\'.mavsdk.rpc.info.GetSpeedFactorResponse\"\x04\x80\xb5\x18\x01\x42\x1b\n\x0eio.mavsdk.infoB\tInfoProtob\x06proto3') @@ -177,19 +177,19 @@ _GETSPEEDFACTORRESPONSE._serialized_start=684 _GETSPEEDFACTORRESPONSE._serialized_end=780 _FLIGHTINFO._serialized_start=782 - _FLIGHTINFO._serialized_end=836 - _IDENTIFICATION._serialized_start=838 - _IDENTIFICATION._serialized_end=896 - _PRODUCT._serialized_start=898 - _PRODUCT._serialized_end=989 - _VERSION._serialized_start=992 - _VERSION._serialized_end=1639 - _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_start=1374 - _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_end=1639 - _INFORESULT._serialized_start=1642 - _INFORESULT._serialized_end=1839 - _INFORESULT_RESULT._serialized_start=1728 - _INFORESULT_RESULT._serialized_end=1839 - _INFOSERVICE._serialized_start=1842 - _INFOSERVICE._serialized_end=2383 + _FLIGHTINFO._serialized_end=905 + _IDENTIFICATION._serialized_start=907 + _IDENTIFICATION._serialized_end=965 + _PRODUCT._serialized_start=967 + _PRODUCT._serialized_end=1058 + _VERSION._serialized_start=1061 + _VERSION._serialized_end=1708 + _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_start=1443 + _VERSION_FLIGHTSOFTWAREVERSIONTYPE._serialized_end=1708 + _INFORESULT._serialized_start=1711 + _INFORESULT._serialized_end=1908 + _INFORESULT_RESULT._serialized_start=1797 + _INFORESULT_RESULT._serialized_end=1908 + _INFOSERVICE._serialized_start=1911 + _INFOSERVICE._serialized_end=2452 # @@protoc_insertion_point(module_scope) diff --git a/proto b/proto index 1acb7897..e3f50d4c 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 1acb7897208423c311c574448b43635f26965c05 +Subproject commit e3f50d4c23a1a0a660e41e814e27f21933602048