Move time update to sensor base class

This commit is contained in:
kamilritz 2019-12-16 10:37:21 +01:00 committed by Mathieu Bresciani
parent 1832bedd13
commit 0831c158f2
4 changed files with 1 additions and 3 deletions

View File

@ -16,7 +16,6 @@ Baro::~Baro()
void Baro::send(uint32_t time)
{
_ekf->setBaroData(time,_baro_data);
_time_last_data_sent = time;
}
void Baro::setData(float baro)

View File

@ -24,7 +24,6 @@ void Imu::send(uint32_t time)
imu_sample.delta_vel = _accel_data * imu_sample.delta_vel_dt;
_ekf->setIMUData(imu_sample);
_time_last_data_sent = time;
}
void Imu::setData(const Vector3f& accel, const Vector3f& gyro)

View File

@ -18,7 +18,6 @@ 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(const Vector3f& mag)

View File

@ -16,6 +16,7 @@ void Sensor::update(uint32_t time)
if(should_send(time))
{
send(time);
_time_last_data_sent = time;
}
}