mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-28 11:00:38 +08:00
Update src/modules/commander/failure_detector/FailureDetector.cpp
Prevent Buffer overflow
This commit is contained in:
1 parent
61a8ae80a6
commit
dbb00d500f
1 file changed
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user