use shared pointer

This commit is contained in:
kamilritz
2019-12-16 09:04:35 +01:00
committed by Mathieu Bresciani
parent 00cd720a66
commit f13f2f8452
14 changed files with 78 additions and 49 deletions
+7 -4
View File
@@ -1,9 +1,11 @@
#include "Mag.h"
#include "mag.h"
namespace sensor_simulator::sensor
namespace sensor_simulator
{
namespace sensor
{
Mag::Mag(Ekf* ekf):Sensor(ekf)
Mag::Mag(std::shared_ptr<Ekf> ekf):Sensor(ekf)
{
}
@@ -19,9 +21,10 @@ void Mag::send(uint32_t time)
_time_last_data_sent = time;
}
void Mag::setData(Vector3f mag)
void Mag::setData(const Vector3f& mag)
{
_mag_data = mag;
}
} // namespace sensor
} // namespace sensor_simulator::sensor