Skip to content

Commit

Permalink
info: add subscription for flight information (#341)
Browse files Browse the repository at this point in the history
This allows to get the flight information update once per second.

Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes authored Apr 16, 2024
1 parent e3f50d4 commit debaacd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protos/info/info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ service InfoService {
rpc GetVersion(GetVersionRequest) returns(GetVersionResponse) { option (mavsdk.options.async_type) = SYNC; }
// Get the speed factor of a simulation (with lockstep a simulation can run faster or slower than realtime).
rpc GetSpeedFactor(GetSpeedFactorRequest) returns(GetSpeedFactorResponse) { option (mavsdk.options.async_type) = SYNC; }

// Subscribe to 'flight information' updates.
rpc SubscribeFlightInformation(SubscribeFlightInformationRequest) returns(stream FlightInformationResponse) { option (mavsdk.options.async_type) = ASYNC; }
}

message GetFlightInformationRequest {}
Expand Down Expand Up @@ -51,6 +54,11 @@ message GetSpeedFactorResponse {
double speed_factor = 2; // Speed factor of simulation
}

message SubscribeFlightInformationRequest {}
message FlightInformationResponse {
FlightInfo flight_info = 1; // The next flight information
}

// System flight information.
message FlightInfo {
uint32 time_boot_ms = 1; // Time since system boot
Expand Down

0 comments on commit debaacd

Please sign in to comment.