mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 22:09:06 +08:00
Update src/modules/commander/failure_detector/FailureDetector.cpp
Prevent Buffer overflow
This commit is contained in:
parent
61a8ae80a6
commit
dbb00d500f
@ -329,7 +329,7 @@ void FailureDetector::updateMotorStatus(const vehicle_status_s &vehicle_status,
|
||||
_failure_detector_status.flags.motor = (_motor_failure_mask != 0u);
|
||||
|
||||
} else { // Disarmed
|
||||
for (uint8_t i = 0; i < actuator_motors_s::NUM_CONTROLS; ++i) {
|
||||
for (uint8_t i = 0; i < esc_status_s::CONNECTED_ESC_MAX; ++i) {
|
||||
_esc_undercurrent_hysteresis[i].set_state_and_update(false, now);
|
||||
_esc_overcurrent_hysteresis[i].set_state_and_update(false, now);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user