mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
estimatorCheck: get param only if handle is valid
This commit is contained in:
1 parent
ba448fb549
commit
7cefc3172a
1 file changed
+5
-1
@@ -99,8 +99,12 @@ void EstimatorChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
}
|
||||
}
|
||||
|
||||
param_t param_ekf2_en_handle = param_find_no_notification("EKF2_EN");
|
||||
int32_t param_ekf2_en = 0;
|
||||
param_get(param_find_no_notification("EKF2_EN"), ¶m_ekf2_en);
|
||||
|
||||
if (param_ekf2_en_handle != PARAM_INVALID) {
|
||||
param_get(param_ekf2_en_handle, ¶m_ekf2_en);
|
||||
}
|
||||
|
||||
if (missing_data && (param_ekf2_en == 1)) {
|
||||
/* EVENT
|
||||
|
||||
Reference in new issue
Block a user