mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
failure detector use per index esc current
This commit is contained in:
parent
332b7bec27
commit
602042dd5c
@ -416,10 +416,10 @@ void FailureDetector::updateMotorStatus(const vehicle_status_s &vehicle_status,
|
||||
|
||||
// Check if ESC current is too low
|
||||
if (cur_esc_report.esc_current > FLT_EPSILON) {
|
||||
_motor_failure_escs_have_current = true;
|
||||
_motor_failure_esc_has_current[i_esc] = true;
|
||||
}
|
||||
|
||||
if (_motor_failure_escs_have_current) {
|
||||
if (_motor_failure_esc_has_current[i_esc]) {
|
||||
float esc_throttle = 0.f;
|
||||
|
||||
if (PX4_ISFINITE(actuator_motors.control[i_esc])) {
|
||||
|
||||
@ -129,7 +129,7 @@ private:
|
||||
uint8_t _motor_failure_esc_valid_current_mask{}; // ESC 1-8, true if ESC telemetry was valid at some point
|
||||
uint8_t _motor_failure_esc_timed_out_mask{}; // ESC telemetry no longer available -> failure
|
||||
uint8_t _motor_failure_esc_under_current_mask{}; // ESC drawing too little current -> failure
|
||||
bool _motor_failure_escs_have_current{false}; // true if some ESC had non-zero current (some don't support it)
|
||||
bool _motor_failure_esc_has_current[actuator_motors_s::NUM_CONTROLS] {false}; // true if some ESC had non-zero current (some don't support it)
|
||||
hrt_abstime _motor_failure_undercurrent_start_time[actuator_motors_s::NUM_CONTROLS] {};
|
||||
|
||||
uORB::Subscription _vehicle_attitude_sub{ORB_ID(vehicle_attitude)};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user