mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 23:47:34 +08:00
use shared pointer
This commit is contained in:
committed by
Mathieu Bresciani
parent
00cd720a66
commit
f13f2f8452
@@ -42,17 +42,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "imu.h"
|
||||
#include "mag.h"
|
||||
#include "baro.h"
|
||||
#include "gps.h"
|
||||
#include "EKF/ekf.h"
|
||||
|
||||
using namespace sensor_simulator::sensor;
|
||||
|
||||
class SensorSimulator
|
||||
{
|
||||
public:
|
||||
SensorSimulator(Ekf* ekf);
|
||||
SensorSimulator(std::shared_ptr<Ekf> ekf);
|
||||
~SensorSimulator();
|
||||
|
||||
void setImuRate(uint32_t rate){ _imu.setRate(rate); }
|
||||
@@ -68,7 +71,7 @@ public:
|
||||
void setImuBias(Vector3f accel_bias, Vector3f gyro_bias);
|
||||
|
||||
private:
|
||||
Ekf* _ekf;
|
||||
std::shared_ptr<Ekf> _ekf;
|
||||
|
||||
Imu _imu;
|
||||
Mag _mag;
|
||||
|
||||
Reference in New Issue
Block a user