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 cdd350f93e
commit 85573b3ff3

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