mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 06:01:37 +08:00
FlightTaskOrbit: alert user about exceeded radius (events)
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
#include "FlightTaskOrbit.hpp"
|
#include "FlightTaskOrbit.hpp"
|
||||||
|
|
||||||
#include <mathlib/mathlib.h>
|
#include <mathlib/mathlib.h>
|
||||||
|
#include <px4_platform_common/events.h>
|
||||||
#include <lib/geo/geo.h>
|
#include <lib/geo/geo.h>
|
||||||
|
|
||||||
using namespace matrix;
|
using namespace matrix;
|
||||||
@@ -77,6 +78,7 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
|
|||||||
_orbit_velocity = new_velocity;
|
_orbit_velocity = new_velocity;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
events::send(events::ID("orbit_radius_exceeded"), events::Log::Alert, "Orbit radius limit exceeded");
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user