Browse Source

FlightTaskOrbit: alert user about exceeded radius (events)

v1.13.0-BW
Matthias Grob 3 years ago
parent
commit
3e8d2fea94
  1. 2
      src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp

2
src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
#include "FlightTaskOrbit.hpp"
#include <mathlib/mathlib.h>
#include <px4_platform_common/events.h>
#include <lib/geo/geo.h>
using namespace matrix;
@ -77,6 +78,7 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command) @@ -77,6 +78,7 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command)
_orbit_velocity = new_velocity;
} else {
events::send(events::ID("orbit_radius_exceeded"), events::Log::Alert, "Orbit radius limit exceeded");
ret = false;
}

Loading…
Cancel
Save