Skip to content

Commit

Permalink
Fixed compilation errors in unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdyk committed Feb 13, 2018
1 parent c86c341 commit 170cf69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions AirLibUnitTests/PixhawkTest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ class PixhawkTest : public TestBase {
public:
virtual void run() override
{
SensorFactory sensor_factory;

//Test PX4 based drones
auto pixhawk = MultiRotorParamsFactory::createConfig("Pixhawk", &sensor_factory);
auto pixhawk = MultiRotorParamsFactory::createConfig("Pixhawk", std::make_shared<SensorFactory>());

DroneControllerBase* controller = pixhawk->getController();
testAssert(controller != nullptr, "Couldn't get pixhawk controller");
Expand Down
3 changes: 1 addition & 2 deletions AirLibUnitTests/RosFlightTest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class RosFlightTest : public TestBase {
public:
virtual void run() override
{
SensorFactory sensor_factory;
auto rosFlight = MultiRotorParamsFactory::createConfig("RosFlight", &sensor_factory);
auto rosFlight = MultiRotorParamsFactory::createConfig("RosFlight", std::make_shared<SensorFactory>());

DroneControllerBase* controller = rosFlight->getController();
testAssert(controller != nullptr, "Couldn't get controller");
Expand Down
2 changes: 1 addition & 1 deletion AirLibUnitTests/SimpleFlightTest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SimpleFlightTest : public TestBase

SensorFactory sensor_factory;

std::unique_ptr<MultiRotorParams> params = MultiRotorParamsFactory::createConfig("SimpleFlight", &sensor_factory);
std::unique_ptr<MultiRotorParams> params = MultiRotorParamsFactory::createConfig("SimpleFlight", std::make_shared<SensorFactory>());
MultiRotor vehicle;
std::unique_ptr<Environment> environment;
vehicle.initialize(params.get(), Pose(),
Expand Down

0 comments on commit 170cf69

Please sign in to comment.