Plane: update for changed peak hold API

This commit is contained in:
Andrew Tridgell 2015-12-31 14:23:18 +11:00
parent b2745bb545
commit 72edfcd1f6

View File

@ -55,7 +55,7 @@ void Plane::update_is_flying_5Hz(void)
// aren't flying using the normal schemes
if (g.crash_accel_threshold == 0) {
crash_state.impact_detected = false;
} else if (ins.get_accel_peak_hold_neg().x < -(g.crash_accel_threshold)) {
} else if (ins.get_accel_peak_hold_neg_x() < -(g.crash_accel_threshold)) {
// large deceleration detected, lets lower confidence VERY quickly
crash_state.impact_detected = true;
crash_state.impact_timer_ms = now_ms;