mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 08:40:35 +08:00
FlightTaskOrbit: reset approach if radius gets changed
This commit is contained in:
committed by
Julian Kent
parent
e9498064ef
commit
9ba2539e60
@@ -130,6 +130,10 @@ bool FlightTaskOrbit::setRadius(float r)
|
||||
_v = sign(_v) * sqrtf(_acceleration_max * r);
|
||||
}
|
||||
|
||||
if (fabs(_r - r) > FLT_EPSILON) {
|
||||
_circle_approach_line.reset();
|
||||
}
|
||||
|
||||
_r = r;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user