Skip to content

Commit

Permalink
examples: changes after new connection interface
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Oct 16, 2020
1 parent ea88326 commit a3b6817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/gimbal_device_tester/gimbal_device_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,17 +524,17 @@ int main(int argc, char** argv)
{
std::promise<void> prom;
std::future<void> fut = prom.get_future();
mavsdk.register_on_discover([&prom](uint64_t /* uuid*/) { prom.set_value(); });
mavsdk.subscribe_on_new_system([&prom]() { prom.set_value(); });

if (fut.wait_for(std::chrono::seconds(2)) != std::future_status::ready) {
std::cout << "FAIL\n";
std::cout << "-> no device found" << std::endl;
return 1;
}
mavsdk.register_on_discover(nullptr);
mavsdk.subscribe_on_new_system(nullptr);
}

System& system = mavsdk.system();
auto system = mavsdk.systems().at(0);
MavlinkPassthrough mavlink_passthrough(system);

AttitudeData attitude_data{};
Expand Down

0 comments on commit a3b6817

Please sign in to comment.