forked from Archive/PX4-Autopilot
mavsdk_tests: remove timeout for mission upload
Just use what is MAVSDK internal.
This commit is contained in:
parent
cf2ffb1086
commit
b79553862e
|
@ -179,15 +179,7 @@ void AutopilotTester::prepare_square_mission(MissionOptions mission_options)
|
||||||
|
|
||||||
_mission->set_return_to_launch_after_mission(mission_options.rtl_at_end);
|
_mission->set_return_to_launch_after_mission(mission_options.rtl_at_end);
|
||||||
|
|
||||||
std::promise<void> prom;
|
REQUIRE(_mission->upload_mission(mission_plan) == Mission::Result::Success);
|
||||||
auto fut = prom.get_future();
|
|
||||||
|
|
||||||
_mission->upload_mission_async(mission_plan, [&prom](Mission::Result result) {
|
|
||||||
REQUIRE(Mission::Result::Success == result);
|
|
||||||
prom.set_value();
|
|
||||||
});
|
|
||||||
|
|
||||||
REQUIRE(fut.wait_for(std::chrono::seconds(2)) == std::future_status::ready);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutopilotTester::prepare_straight_mission(MissionOptions mission_options)
|
void AutopilotTester::prepare_straight_mission(MissionOptions mission_options)
|
||||||
|
@ -203,15 +195,7 @@ void AutopilotTester::prepare_straight_mission(MissionOptions mission_options)
|
||||||
|
|
||||||
_mission->set_return_to_launch_after_mission(mission_options.rtl_at_end);
|
_mission->set_return_to_launch_after_mission(mission_options.rtl_at_end);
|
||||||
|
|
||||||
std::promise<void> prom;
|
REQUIRE(_mission->upload_mission(mission_plan) == Mission::Result::Success);
|
||||||
auto fut = prom.get_future();
|
|
||||||
|
|
||||||
_mission->upload_mission_async(mission_plan, [&prom](Mission::Result result) {
|
|
||||||
REQUIRE(Mission::Result::Success == result);
|
|
||||||
prom.set_value();
|
|
||||||
});
|
|
||||||
|
|
||||||
REQUIRE(fut.wait_for(std::chrono::seconds(2)) == std::future_status::ready);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutopilotTester::execute_mission()
|
void AutopilotTester::execute_mission()
|
||||||
|
|
Loading…
Reference in New Issue