Change folder name

This commit is contained in:
kamilritz
2019-12-16 08:28:36 +01:00
committed by Mathieu Bresciani
parent b9dd1e54c5
commit 00cd720a66
13 changed files with 0 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "sensor.h"
namespace sensor_simulator
{
Sensor::Sensor(Ekf* ekf)
{
_ekf = ekf;
}
Sensor::~Sensor()
{
}
void Sensor::update(uint32_t time)
{
if(should_send(time))
{
send(time);
}
}
bool Sensor::should_send(uint32_t time)
{
return _is_running && is_time_to_send(time);
}
bool Sensor::is_time_to_send(uint32_t time)
{
return (time >= _time_last_data_sent) && ((time - _time_last_data_sent) >= _update_period);
}
} // namespace sensor_simulator