Skip to content

Commit

Permalink
estimatorCheck: get param only if handle is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
bresch authored and dagar committed Apr 25, 2024
1 parent ba448fb commit 7cefc31
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"), &param_ekf2_en);

if (param_ekf2_en_handle != PARAM_INVALID) {
param_get(param_ekf2_en_handle, &param_ekf2_en);
}

if (missing_data && (param_ekf2_en == 1)) {
/* EVENT
Expand Down

0 comments on commit 7cefc31

Please sign in to comment.