Plane: fixed a division by zero

if min airspeed is zero
This commit is contained in:
Andrew Tridgell 2017-11-19 16:04:40 +11:00
parent 5ad64b8656
commit f02db254b7
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ void Plane::update_load_factor(void)
}
float max_load_factor = smoothed_airspeed / aparm.airspeed_min;
float max_load_factor = smoothed_airspeed / MAX(aparm.airspeed_min, 1);
if (max_load_factor <= 1) {
// our airspeed is below the minimum airspeed. Limit roll to
// 25 degrees