Plane: prevent divide by zero in SITL

harmless on PX4
This commit is contained in:
Andrew Tridgell 2016-06-04 19:20:18 +10:00
parent 9e9a048016
commit 835235127c
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ float Plane::get_speed_scaler(void)
if (aspeed > auto_state.highest_airspeed) {
auto_state.highest_airspeed = aspeed;
}
if (aspeed > 0) {
if (aspeed > 0.0001f) {
speed_scaler = g.scaling_speed / aspeed;
} else {
speed_scaler = 2.0;