FlightTaskOrbit: alert user about exceeded radius (mavlink_log)

This commit is contained in:
Matthias Grob
2022-03-29 18:46:37 +02:00
parent 3e8d2fea94
commit 7cd57b4415
2 changed files with 3 additions and 0 deletions
@@ -37,6 +37,7 @@
#include "FlightTaskOrbit.hpp"
#include <lib/systemlib/mavlink_log.h>
#include <mathlib/mathlib.h>
#include <px4_platform_common/events.h>
#include <lib/geo/geo.h>
@@ -78,6 +79,7 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
_orbit_velocity = new_velocity;
} else {
mavlink_log_critical(&_mavlink_log_pub, "Orbit radius limit exceeded\t");
events::send(events::ID("orbit_radius_exceeded"), events::Log::Alert, "Orbit radius limit exceeded");
ret = false;
}