mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -04:00
AP_InertialSensor: check for zero delta_velocity dt
This commit is contained in:
parent
b306d7a356
commit
45e016ea5b
@ -525,7 +525,7 @@ bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract* interact
|
|||||||
// capture sample
|
// capture sample
|
||||||
for (uint8_t k=0; k<num_accels; k++) {
|
for (uint8_t k=0; k<num_accels; k++) {
|
||||||
Vector3f samp;
|
Vector3f samp;
|
||||||
if(get_delta_velocity(k,samp)) {
|
if(get_delta_velocity(k,samp) && _delta_velocity_dt[k] > 0) {
|
||||||
samp /= _delta_velocity_dt[k];
|
samp /= _delta_velocity_dt[k];
|
||||||
} else {
|
} else {
|
||||||
samp = get_accel(k);
|
samp = get_accel(k);
|
||||||
|
Loading…
Reference in New Issue
Block a user