Skip to content

Commit

Permalink
Move time update to sensor base class
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilritz authored and bresch committed Dec 16, 2019
1 parent 1832bed commit 0831c15
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion test/sensor_simulator/baro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion test/sensor_simulator/imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion test/sensor_simulator/mag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions test/sensor_simulator/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void Sensor::update(uint32_t time)
if(should_send(time))
{
send(time);
_time_last_data_sent = time;
}
}

Expand Down

0 comments on commit 0831c15

Please sign in to comment.