Skip to content

Commit

Permalink
camera: remove some wrong or unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Apr 20, 2018
1 parent 1367076 commit 3bba620
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions integration_tests/camera_test_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ Camera::Mode get_mode(std::shared_ptr<Camera> camera)
auto prom = std::make_shared<std::promise<PromiseResult>>();
auto ret = prom->get_future();

// Let's get the mode first
camera->get_mode_async([prom](Camera::Result result, Camera::Mode mode) {
PromiseResult pr {};
pr.result = result;
pr.mode = mode;
prom->set_value(pr);
});

// Block now for a while to wait for result.
auto status = ret.wait_for(std::chrono::seconds(7));

EXPECT_EQ(status, std::future_status::ready);
Expand Down Expand Up @@ -52,15 +50,13 @@ void set_mode(std::shared_ptr<Camera> camera, Camera::Mode mode)
auto prom = std::make_shared<std::promise<void>>();
auto ret = prom->get_future();

// Let's get the mode first
camera->set_mode_async(mode, [mode, prom](Camera::Result result,
Camera::Mode mode_got) {
EXPECT_EQ(result, Camera::Result::SUCCESS);
EXPECT_EQ(mode, mode_got);
prom->set_value();
});

// Block now for a while to wait for result.
auto status = ret.wait_for(std::chrono::seconds(10));

EXPECT_EQ(status, std::future_status::ready);
Expand All @@ -86,7 +82,6 @@ Camera::Result set_setting(std::shared_ptr<Camera> camera,
prom->set_value(result);
});

// Block now to wait for result but only for a second, we're in a hurry.
auto status = ret.wait_for(std::chrono::seconds(1));

EXPECT_EQ(status, std::future_status::ready);
Expand Down Expand Up @@ -117,7 +112,6 @@ dronecore::Camera::Result get_setting(std::shared_ptr<dronecore::Camera> camera,
prom->set_value(promise_result);
});

// Block now to wait for result but only for a second, we're in a hurry.
auto status = ret.wait_for(std::chrono::seconds(1));

EXPECT_EQ(status, std::future_status::ready);
Expand Down

0 comments on commit 3bba620

Please sign in to comment.