mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 00:24:08 +08:00
- allocate IMU and output buffers on construction according to defaults - determine buffer max time delay based on configuration parameters - reorder flowSample and extVisionSample to minimize padding - adjust parameter defaults to match PX4-Autopilot
28 lines
337 B
C++
28 lines
337 B
C++
#include "baro.h"
|
|
|
|
namespace sensor_simulator
|
|
{
|
|
namespace sensor
|
|
{
|
|
|
|
Baro::Baro(std::shared_ptr<Ekf> ekf):Sensor(ekf)
|
|
{
|
|
}
|
|
|
|
Baro::~Baro()
|
|
{
|
|
}
|
|
|
|
void Baro::send(uint64_t time)
|
|
{
|
|
_ekf->setBaroData(baroSample{time, _baro_data});
|
|
}
|
|
|
|
void Baro::setData(float baro)
|
|
{
|
|
_baro_data = baro;
|
|
}
|
|
|
|
} // namespace sensor
|
|
} // namespace sensor_simulator
|