mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-10 06:39:25 +08:00
rtl_direct: send out message to inform that rtl is avoiding geofence
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -94,6 +94,12 @@ void RtlDirect::on_activation()
|
||||
events::send<int32_t, int32_t>(events::ID("vrtl_return_at"), events::Log::Info,
|
||||
"RTL: start return at {1m_v} ({2m_v} above destination)",
|
||||
(int32_t)ceilf(_rtl_alt), (int32_t)ceilf(_rtl_alt - _destination.alt));
|
||||
|
||||
// send out message only for the first point
|
||||
if (_geofence_aware_return_path.num_points > 0) {
|
||||
mavlink_log_info(_navigator->get_mavlink_log_pub(), "RTL: avoiding geofence\t");
|
||||
events::send(events::ID("rtl_avoiding_geofence"), events::Log::Info, "RTL: avoiding geofence");
|
||||
}
|
||||
}
|
||||
|
||||
void RtlDirect::on_active()
|
||||
@@ -257,6 +263,7 @@ void RtlDirect::set_rtl_item()
|
||||
|
||||
case RTLState::AVOID_GEOFENCE: {
|
||||
|
||||
|
||||
matrix::Vector2d point = _geofence_aware_return_path.getAndPopCurrentPoint();
|
||||
|
||||
if (point.isAllNan()) {
|
||||
|
||||
Reference in New Issue
Block a user