Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PublishDistanceSensor to Telemetry Server #310

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions protos/telemetry/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,12 @@ message Odometry {

// DistanceSensor message type.
message DistanceSensor {
float minimum_distance_m = 1 [(mavsdk.options.default_value)="NaN"]; // Minimum distance the sensor can measure, NaN if unknown.
float maximum_distance_m = 2 [(mavsdk.options.default_value)="NaN"]; // Maximum distance the sensor can measure, NaN if unknown.
float current_distance_m = 3 [(mavsdk.options.default_value)="NaN"]; // Current distance reading, NaN if unknown.
float minimum_distance_m = 1 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float maximum_distance_m = 2 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float current_distance_m = 3 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float minimum_distance_cm = 1 [(mavsdk.options.default_value)="NaN"]; // Minimum distance the sensor can measure, NaN if unknown.
float maximum_distance_cm = 2 [(mavsdk.options.default_value)="NaN"]; // Maximum distance the sensor can measure, NaN if unknown.
float current_distance_cm = 3 [(mavsdk.options.default_value)="NaN"]; // Current distance reading, NaN if unknown.
}

// Scaled Pressure message type.
Expand Down
19 changes: 16 additions & 3 deletions protos/telemetry_server/telemetry_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ service TelemetryServerService {
rpc PublishRawImu(PublishRawImuRequest) returns(PublishRawImuResponse) { option (mavsdk.options.async_type) = SYNC; }
// Publish to 'unix epoch time' updates.
rpc PublishUnixEpochTime(PublishUnixEpochTimeRequest) returns(PublishUnixEpochTimeResponse) { option (mavsdk.options.async_type) = SYNC; }
// Publish to "distance sensor" updates.
rpc PublishDistanceSensor(PublishDistanceSensorRequest) returns(PublishDistanceSensorResponse) { option (mavsdk.options.async_type) = SYNC; }
}

message PublishPositionRequest {
Expand Down Expand Up @@ -119,6 +121,10 @@ message PublishUnixEpochTimeRequest {
uint64 time_us = 1; // The next 'unix epoch time' status
}

message PublishDistanceSensorRequest {
DistanceSensor distance_sensor = 1; // The next 'Distance Sensor' status
}

message PublishPositionResponse {
TelemetryServerResult telemetry_server_result = 1;
}
Expand Down Expand Up @@ -177,6 +183,10 @@ message PublishUnixEpochTimeResponse {
TelemetryServerResult telemetry_server_result = 1;
}

message PublishDistanceSensorResponse {
TelemetryServerResult telemetry_server_result = 1;
}

// Position type in global coordinates.
message Position {
double latitude_deg = 1 [(mavsdk.options.default_value)="NaN"]; // Latitude in degrees (range: -90 to +90)
Expand Down Expand Up @@ -381,9 +391,12 @@ message Odometry {

// DistanceSensor message type.
message DistanceSensor {
float minimum_distance_m = 1 [(mavsdk.options.default_value)="NaN"]; // Minimum distance the sensor can measure, NaN if unknown.
float maximum_distance_m = 2 [(mavsdk.options.default_value)="NaN"]; // Maximum distance the sensor can measure, NaN if unknown.
float current_distance_m = 3 [(mavsdk.options.default_value)="NaN"]; // Current distance reading, NaN if unknown.
float minimum_distance_m = 1 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float maximum_distance_m = 2 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float current_distance_m = 3 [(mavsdk.options.default_value)="NaN"]; // OBSOLETE: This was a typo in the naming.
float minimum_distance_cm = 1 [(mavsdk.options.default_value)="NaN"]; // Minimum distance the sensor can measure, NaN if unknown.
float maximum_distance_cm = 2 [(mavsdk.options.default_value)="NaN"]; // Maximum distance the sensor can measure, NaN if unknown.
float current_distance_cm = 3 [(mavsdk.options.default_value)="NaN"]; // Current distance reading, NaN if unknown.
}

// Scaled Pressure message type.
Expand Down