mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
renamed MOVE_TO_INTERMEDIATE_POINT to AVOID_GEOFENCE
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -162,7 +162,7 @@ void RtlDirect::_updateRtlState()
|
|||||||
switch (_rtl_state) {
|
switch (_rtl_state) {
|
||||||
case RTLState::CLIMBING:
|
case RTLState::CLIMBING:
|
||||||
if (_geofence_aware_return_path.hasNextPoint()) {
|
if (_geofence_aware_return_path.hasNextPoint()) {
|
||||||
new_state = RTLState::MOVE_TO_INTERMEDIATE_POINT;
|
new_state = RTLState::AVOID_GEOFENCE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
new_state = RTLState::MOVE_TO_LOITER;
|
new_state = RTLState::MOVE_TO_LOITER;
|
||||||
@@ -170,9 +170,9 @@ void RtlDirect::_updateRtlState()
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RTLState::MOVE_TO_INTERMEDIATE_POINT:
|
case RTLState::AVOID_GEOFENCE:
|
||||||
if (_geofence_aware_return_path.hasNextPoint()) {
|
if (_geofence_aware_return_path.hasNextPoint()) {
|
||||||
new_state = RTLState::MOVE_TO_INTERMEDIATE_POINT;
|
new_state = RTLState::AVOID_GEOFENCE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
new_state = RTLState::MOVE_TO_LOITER;
|
new_state = RTLState::MOVE_TO_LOITER;
|
||||||
@@ -256,7 +256,7 @@ void RtlDirect::set_rtl_item()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RTLState::MOVE_TO_INTERMEDIATE_POINT: {
|
case RTLState::AVOID_GEOFENCE: {
|
||||||
|
|
||||||
matrix::Vector2d point = _geofence_aware_return_path.getAndPopCurrentPoint();
|
matrix::Vector2d point = _geofence_aware_return_path.getAndPopCurrentPoint();
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ RtlDirect::RTLState RtlDirect::getActivationState()
|
|||||||
activation_state = RTLState::CLIMBING;
|
activation_state = RTLState::CLIMBING;
|
||||||
|
|
||||||
} else if (_geofence_aware_return_path.hasNextPoint()) {
|
} else if (_geofence_aware_return_path.hasNextPoint()) {
|
||||||
activation_state = RTLState::MOVE_TO_INTERMEDIATE_POINT;
|
activation_state = RTLState::AVOID_GEOFENCE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
activation_state = RTLState::MOVE_TO_LOITER;
|
activation_state = RTLState::MOVE_TO_LOITER;
|
||||||
@@ -495,7 +495,7 @@ rtl_time_estimate_s RtlDirect::calc_rtl_time_estimate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FALLTHROUGH
|
// FALLTHROUGH
|
||||||
case RTLState::MOVE_TO_INTERMEDIATE_POINT: {
|
case RTLState::AVOID_GEOFENCE: {
|
||||||
const int num_points = _geofence_aware_return_path.num_points;
|
const int num_points = _geofence_aware_return_path.num_points;
|
||||||
|
|
||||||
for (int i = 0; i < num_points - 1; ++i) {
|
for (int i = 0; i < num_points - 1; ++i) {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
enum class RTLState {
|
enum class RTLState {
|
||||||
CLIMBING,
|
CLIMBING,
|
||||||
MOVE_TO_INTERMEDIATE_POINT,
|
AVOID_GEOFENCE,
|
||||||
MOVE_TO_LOITER,
|
MOVE_TO_LOITER,
|
||||||
LOITER_DOWN,
|
LOITER_DOWN,
|
||||||
LOITER_HOLD,
|
LOITER_HOLD,
|
||||||
|
|||||||
Reference in New Issue
Block a user