mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 17:51:35 +08:00
FlightTaskOrbit: alert user about exceeded radius (mavlink_log)
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "FlightTaskOrbit.hpp"
|
#include "FlightTaskOrbit.hpp"
|
||||||
|
|
||||||
|
#include <lib/systemlib/mavlink_log.h>
|
||||||
#include <mathlib/mathlib.h>
|
#include <mathlib/mathlib.h>
|
||||||
#include <px4_platform_common/events.h>
|
#include <px4_platform_common/events.h>
|
||||||
#include <lib/geo/geo.h>
|
#include <lib/geo/geo.h>
|
||||||
@@ -78,6 +79,7 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
|
|||||||
_orbit_velocity = new_velocity;
|
_orbit_velocity = new_velocity;
|
||||||
|
|
||||||
} else {
|
} 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");
|
events::send(events::ID("orbit_radius_exceeded"), events::Log::Alert, "Orbit radius limit exceeded");
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ private:
|
|||||||
float _initial_heading = 0.f; /**< the heading of the drone when the orbit command was issued */
|
float _initial_heading = 0.f; /**< the heading of the drone when the orbit command was issued */
|
||||||
SlewRateYaw<float> _slew_rate_yaw;
|
SlewRateYaw<float> _slew_rate_yaw;
|
||||||
|
|
||||||
|
orb_advert_t _mavlink_log_pub{nullptr};
|
||||||
uORB::PublicationMulti<orbit_status_s> _orbit_status_pub{ORB_ID(orbit_status)};
|
uORB::PublicationMulti<orbit_status_s> _orbit_status_pub{ORB_ID(orbit_status)};
|
||||||
|
|
||||||
DEFINE_PARAMETERS(
|
DEFINE_PARAMETERS(
|
||||||
|
|||||||
Reference in New Issue
Block a user