forked from Archive/PX4-Autopilot
FlightTaskOrbit: reset approach if radius gets changed
This commit is contained in:
parent
e9498064ef
commit
9ba2539e60
|
@ -130,6 +130,10 @@ bool FlightTaskOrbit::setRadius(float r)
|
||||||
_v = sign(_v) * sqrtf(_acceleration_max * r);
|
_v = sign(_v) * sqrtf(_acceleration_max * r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fabs(_r - r) > FLT_EPSILON) {
|
||||||
|
_circle_approach_line.reset();
|
||||||
|
}
|
||||||
|
|
||||||
_r = r;
|
_r = r;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue