FailureDetector: increase threshold for valid current to 1A

Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
Silvan 2025-08-13 11:21:32 +02:00
parent f161a32c55
commit f5bc0591e0

View File

@ -394,7 +394,9 @@ void FailureDetector::updateMotorStatus(const vehicle_status_s &vehicle_status,
}
// Check if ESC telemetry was available and valid at some point. This is a prerequisite for the failure detection.
if (!(_motor_failure_esc_valid_current_mask & (1 << i_esc)) && cur_esc_report.esc_current > 0.0f) {
static constexpr float kMinExpectedCurrent = 1.f; // we consider the current measurement valid if ever above this value
if (!(_motor_failure_esc_valid_current_mask & (1 << i_esc)) && cur_esc_report.esc_current > kMinExpectedCurrent) {
_motor_failure_esc_valid_current_mask |= (1 << i_esc);
}