Commander: trigger failsafe action if imbalanced propeller detected

This commit is contained in:
bresch
2021-04-27 15:31:22 +02:00
committed by Daniel Agar
parent 5dfb8e594a
commit b8ed457371
5 changed files with 90 additions and 0 deletions
+9
View File
@@ -2660,6 +2660,14 @@ Commander::run()
send_parachute_command();
}
}
if ((_status.failure_detector_status & vehicle_status_s::FAILURE_IMBALANCED_PROP)
&& !_imbalanced_propeller_check_triggered) {
_status_changed = true;
_imbalanced_propeller_check_triggered = true;
imbalanced_prop_failsafe(&_mavlink_log_pub, _status, _status_flags, &_internal_state,
(imbalanced_propeller_action_t)_param_com_imb_prop_act.get());
}
}
}
@@ -2729,6 +2737,7 @@ Commander::run()
if (!_armed.armed) {
/* Reset the flag if disarmed. */
_have_taken_off_since_arming = false;
_imbalanced_propeller_check_triggered = false;
}
/* now set navigation state according to failsafe and main state */