From d0f5fd29a3aedb197ea4add8cf44690d9a0a674e Mon Sep 17 00:00:00 2001 From: Stefano Pagnottelli Date: Tue, 16 Jan 2024 07:46:46 +0100 Subject: [PATCH] remote_id: Added arm status stream --- protos/remote_id/remote_id.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/protos/remote_id/remote_id.proto b/protos/remote_id/remote_id.proto index 88de8f7f..570864a0 100644 --- a/protos/remote_id/remote_id.proto +++ b/protos/remote_id/remote_id.proto @@ -32,6 +32,10 @@ service RemoteIdService { * Update the SetSelfId structure sent with the self_id packet */ rpc SetSelfId(SetSelfIdRequest) returns(SetSelfIdResponse) { option (mavsdk.options.async_type) = SYNC; } + /* + * Subscribe to arm status updates. + */ + rpc SubscribeArmStatus(SubscribeArmStatusRequest) returns(stream ArmStatusResponse) {} } message SetBasicIdRequest { @@ -76,6 +80,11 @@ message SetSelfIdResponse { RemoteIdResult remote_id_result = 1; } +message SubscribeArmStatusRequest { } +message ArmStatusResponse { + ArmStatus arm_status = 1; +} + message BasicId { enum IdType { ID_TYPE_NONE = 0; // No type defined. @@ -261,6 +270,16 @@ message SelfId { string description = 2; // Text description or numeric value expressed as ASCII characters. } +message ArmStatus { + enum Status { + STATUS_GOOD_TO_ARM = 0; // Passing arming checks. + STATUS_PRE_ARM_FAIL_GENERIC = 1; // Generic arming failure, see error string for details. + } + + Status status = 1; // Status level indicating if arming is allowed. + string error = 2; // Text error message, should be empty if status is good to arm. Fill with nulls in unused portion. +} + // Result type. message RemoteIdResult { // Possible results returned for camera commands