Skip to content

Commit

Permalink
airspeed calibration fail with any errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and LorenzMeier committed Nov 19, 2016
1 parent 46a6977 commit 9e589ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/commander/airspeed_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
diff_pres_offset += diff_pres.differential_pressure_raw_pa;
calibration_counter++;

/* any differential pressure failure a reason to abort */
if (diff_pres.error_count != 0) {
calibration_log_critical(mavlink_log_pub, "[cal] airspeed error count non zero");
feedback_calibration_failed(mavlink_log_pub);
goto error_return;
}

if (calibration_counter % (calibration_count / 20) == 0) {
calibration_log_info(mavlink_log_pub, CAL_QGC_PROGRESS_MSG, (calibration_counter * 80) / calibration_count);
}
Expand Down

0 comments on commit 9e589ce

Please sign in to comment.