mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 17:01:35 +08:00
Update src/modules/commander/failure_detector/FailureDetector.cpp
Prevent Buffer overflow
This commit is contained in:
@@ -329,7 +329,7 @@ void FailureDetector::updateMotorStatus(const vehicle_status_s &vehicle_status,
|
|||||||
_failure_detector_status.flags.motor = (_motor_failure_mask != 0u);
|
_failure_detector_status.flags.motor = (_motor_failure_mask != 0u);
|
||||||
|
|
||||||
} else { // Disarmed
|
} 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_undercurrent_hysteresis[i].set_state_and_update(false, now);
|
||||||
_esc_overcurrent_hysteresis[i].set_state_and_update(false, now);
|
_esc_overcurrent_hysteresis[i].set_state_and_update(false, now);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user