Skip to content

Commit

Permalink
Suggestions 365
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Jul 25, 2023
1 parent 2acd508 commit 424e4b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
11 changes: 11 additions & 0 deletions src/Manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ bool Manager::Remove(const gz::sensors::SensorId _id)
return this->dataPtr->sensors.erase(_id) > 0;
}

/////////////////////////////////////////////////
SensorId Manager::AddSensor(
std::unique_ptr<sensors::Sensor> _sensor)
{
if (!_sensor)
return NO_SENSOR;
SensorId id = _sensor->Id();
this->dataPtr->sensors[id] = std::move(_sensor);
return id;
}

//////////////////////////////////////////////////
void Manager::RunOnce(
const std::chrono::steady_clock::duration &_time, bool _force)
Expand Down

0 comments on commit 424e4b1

Please sign in to comment.