forked from Archive/PX4-Autopilot
esc_calibration: allow to calibrate ESCs without battery detection
Before this the ESC calibration aborts if battery detection doesn't work. The problem is if the user still connects the battery as he gets instructed and the calibration aborts then the ESCs are in calibration mode and after abortion calibrate to the wrong value. Also I realized there's no additional safety by aborting the calibration if the battery cannot be detected during the timeout because a pixhawk board without power module will report a battery status from the ADC driverand in it that no battery is connected which is the best it can do. In this situation the motors will still spin if the ESCs are powered.
This commit is contained in:
parent
ae678e8e2f
commit
db89bd5b5e
|
@ -133,8 +133,9 @@ int do_esc_calibration(orb_advert_t *mavlink_log_pub)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((now - timeout_start) > 6_s) {
|
if ((now - timeout_start) > 6_s) {
|
||||||
// Timeout, we abort here
|
// Timeout, we continue since maybe the battery cannot be detected properly
|
||||||
calibration_failed = true;
|
// If we abort here and the ESCs are infact connected and started calibrating
|
||||||
|
// they will measure the disarmed value as the lower limit instead of the fixed 1000us
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue