mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 03:21:35 +08:00
ekf2: multi instance numbering consistent with uORB publication instances
This commit is contained in:
@@ -96,7 +96,7 @@ class EKF2 final : public ModuleParams, public px4::ScheduledWorkItem
|
||||
{
|
||||
public:
|
||||
EKF2() = delete;
|
||||
EKF2(int instance, const px4::wq_config_t &config, int imu, int mag, bool replay_mode);
|
||||
EKF2(bool multi_mode, const px4::wq_config_t &config, bool replay_mode);
|
||||
~EKF2() override;
|
||||
|
||||
/** @see ModuleBase */
|
||||
@@ -118,6 +118,10 @@ public:
|
||||
static bool trylock_module() { return (pthread_mutex_trylock(&ekf2_module_mutex) == 0); }
|
||||
static void unlock_module() { pthread_mutex_unlock(&ekf2_module_mutex); }
|
||||
|
||||
bool multi_init(int imu, int mag);
|
||||
|
||||
int instance() const { return _instance; }
|
||||
|
||||
private:
|
||||
void Run() override;
|
||||
|
||||
@@ -158,7 +162,7 @@ private:
|
||||
|
||||
const bool _replay_mode{false}; ///< true when we use replay data from a log
|
||||
const bool _multi_mode;
|
||||
const int _instance;
|
||||
int _instance{0};
|
||||
|
||||
px4::atomic_bool _task_should_exit{false};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user