2019-12-16 13:40:01 +01:00

28 lines
337 B
C++

#include "Mag.h"
namespace sensor_simulator::sensor
{
Mag::Mag(Ekf* ekf):Sensor(ekf)
{
}
Mag::~Mag()
{
}
void Mag::send(uint32_t time)
{
float mag[3];
_mag_data.copyTo(mag);
_ekf->setMagData(time,mag);
_time_last_data_sent = time;
}
void Mag::setData(Vector3f mag)
{
_mag_data = mag;
}
} // namespace sensor_simulator::sensor