mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 22:23:35 +08:00
Delete redundant Ekf class member variable constructor initilizations and add missing C++ style initializers to the header file.
This commit is contained in:
@@ -55,9 +55,9 @@ public:
|
||||
void setLimits(float min_distance_m, float max_distance_m);
|
||||
|
||||
private:
|
||||
rangeSample _range_sample {};
|
||||
float _min_distance {0.2f};
|
||||
float _max_distance {20.0f};
|
||||
rangeSample _range_sample{};
|
||||
float _min_distance{0.2f};
|
||||
float _max_distance{20.0f};
|
||||
|
||||
void send(uint64_t time) override;
|
||||
};
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
using namespace sensor_simulator::sensor;
|
||||
|
||||
struct sensor_info {
|
||||
uint64_t timestamp {};
|
||||
uint64_t timestamp{};
|
||||
enum measurement_t {IMU, MAG, BARO, GPS, AIRSPEED, RANGE, FLOW, VISION, LANDING_STATUS} sensor_type = IMU;
|
||||
std::array<double, 10> sensor_data {};
|
||||
std::array<double, 10> sensor_data{};
|
||||
};
|
||||
|
||||
class SensorSimulator
|
||||
@@ -120,8 +120,6 @@ public:
|
||||
RangeFinder _rng;
|
||||
Vio _vio;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
void setSensorDataToDefault();
|
||||
void setSensorDataFromReplayData();
|
||||
@@ -130,14 +128,14 @@ private:
|
||||
void startBasicSensor();
|
||||
void updateSensors();
|
||||
|
||||
std::shared_ptr<Ekf> _ekf {nullptr};
|
||||
std::shared_ptr<Ekf> _ekf{nullptr};
|
||||
|
||||
std::vector<sensor_info> _replay_data {};
|
||||
std::vector<sensor_info> _replay_data{};
|
||||
|
||||
bool _has_replay_data {false};
|
||||
bool _has_replay_data{false};
|
||||
|
||||
uint64_t _current_replay_data_index {0};
|
||||
uint64_t _time {0}; // microseconds
|
||||
uint64_t _current_replay_data_index{0};
|
||||
uint64_t _time{0}; // microseconds
|
||||
|
||||
};
|
||||
#endif // !EKF_SENSOR_SIMULATOR_H
|
||||
|
||||
Reference in New Issue
Block a user