AC_Circle: run horizontal position control at main loop rate

This commit is contained in:
Randy Mackay 2018-03-09 11:40:56 +09:00
parent ac82a37728
commit e9c23b538e

View File

@ -111,11 +111,6 @@ void AC_Circle::update()
{
// calculate dt
float dt = _pos_control.time_since_last_xy_update();
// update circle position at poscontrol update rate
if (dt >= _pos_control.get_dt_xy()) {
// double check dt is reasonable
if (dt >= 0.2f) {
dt = 0.0f;
}
@ -166,7 +161,6 @@ void AC_Circle::update()
// update position controller
_pos_control.update_xy_controller(1.0f);
}
}
// get_closest_point_on_circle - returns closest point on the circle
// circle's center should already have been set