Skip to content
Snippets Groups Projects
Commit 3da103ac authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

enable shared from this

parent 15c9ba26
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ SensorBasePtr HardwareBase::addSensor(SensorBasePtr _sensor_ptr) ...@@ -19,6 +19,7 @@ SensorBasePtr HardwareBase::addSensor(SensorBasePtr _sensor_ptr)
{ {
sensor_list_.push_back(_sensor_ptr); sensor_list_.push_back(_sensor_ptr);
_sensor_ptr->setProblem(getProblem()); _sensor_ptr->setProblem(getProblem());
_sensor_ptr->setHardwarePtr(shared_from_this());
_sensor_ptr->registerNewStateBlocks(); _sensor_ptr->registerNewStateBlocks();
......
...@@ -14,7 +14,7 @@ class SensorBase; ...@@ -14,7 +14,7 @@ class SensorBase;
namespace wolf { namespace wolf {
//class HardwareBase //class HardwareBase
class HardwareBase : public NodeBase class HardwareBase : public NodeBase, public std::enable_shared_from_this<HardwareBase>
{ {
private: private:
SensorBaseList sensor_list_; SensorBaseList sensor_list_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment