mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 18:33:33 +08:00
delete SYS_MC_EST_GROUP
- introduce per module parameters (EKF2_EN, LPE_EN, ATT_EN) - add basic checks to prevent EKF2 + LPE running simultaneously
This commit is contained in:
@@ -137,6 +137,14 @@ BlockLocalPositionEstimator::BlockLocalPositionEstimator() :
|
||||
bool
|
||||
BlockLocalPositionEstimator::init()
|
||||
{
|
||||
uORB::SubscriptionData<vehicle_local_position_s> vehicle_local_position_sub{ORB_ID(vehicle_local_position)};
|
||||
vehicle_local_position_sub.update();
|
||||
|
||||
if (vehicle_local_position_sub.advertised() && (hrt_elapsed_time(&vehicle_local_position_sub.get().timestamp) < 1_s)) {
|
||||
PX4_ERR("init failed, vehicle_local_position already advertised");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_sensors_sub.registerCallback()) {
|
||||
PX4_ERR("callback registration failed");
|
||||
return false;
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#include <parameters/param.h>
|
||||
|
||||
// 16 is max name length
|
||||
/**
|
||||
* Local position estimator enable (unsupported)
|
||||
*
|
||||
* @group Local Position Estimator
|
||||
* @boolean
|
||||
*/
|
||||
PARAM_DEFINE_INT32(LPE_EN, 0);
|
||||
|
||||
/**
|
||||
* Optical flow z offset from center
|
||||
|
||||
Reference in New Issue
Block a user