Plane: fixed LOITER_TURNS counter for counter-clockwise loiter

thanks to Iskess for finding this bug!
This commit is contained in:
Andrew Tridgell 2014-05-01 20:32:34 +10:00
parent c3d6ed1e3e
commit f51478ee1d

View File

@ -37,7 +37,7 @@ static void loiter_angle_update(void)
loiter.old_target_bearing_cd = target_bearing_cd;
loiter_delta_cd = wrap_180_cd(loiter_delta_cd);
loiter.sum_cd += loiter_delta_cd;
loiter.sum_cd += loiter_delta_cd * loiter.direction;
}
//****************************************************************