From 0eb327743e4633751ef43619d74b1101e0184740 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 21 Feb 2021 11:08:26 -0500 Subject: [PATCH] move min/max distance to ground limits to FlightTask ManualAltitude --- .../flight_mode_manager/tasks/FlightTask/FlightTask.hpp | 3 --- .../tasks/ManualAltitude/FlightTaskManualAltitude.hpp | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp b/src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp index 8c823196e1..827ea71dc6 100644 --- a/src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp +++ b/src/modules/flight_mode_manager/tasks/FlightTask/FlightTask.hpp @@ -227,9 +227,6 @@ protected: float _dist_to_bottom{}; /**< current height above ground level */ float _dist_to_ground{}; /**< equals _dist_to_bottom if valid, height above home otherwise */ - float _min_distance_to_ground{-INFINITY}; /**< min distance to ground constraint */ - float _max_distance_to_ground{INFINITY}; /**< max distance to ground constraint */ - /** * Setpoints which the position controller has to execute. * Setpoints that are set to NAN are not controlled. Not all setpoints can be set at the same time. diff --git a/src/modules/flight_mode_manager/tasks/ManualAltitude/FlightTaskManualAltitude.hpp b/src/modules/flight_mode_manager/tasks/ManualAltitude/FlightTaskManualAltitude.hpp index 4980ae8d1c..28ac362466 100644 --- a/src/modules/flight_mode_manager/tasks/ManualAltitude/FlightTaskManualAltitude.hpp +++ b/src/modules/flight_mode_manager/tasks/ManualAltitude/FlightTaskManualAltitude.hpp @@ -139,6 +139,9 @@ private: bool _terrain_follow{false}; /**< true when the vehicle is following the terrain height */ bool _terrain_hold{false}; /**< true when vehicle is controlling height above a static ground position */ + float _min_distance_to_ground{-INFINITY}; /**< min distance to ground constraint */ + float _max_distance_to_ground{INFINITY}; /**< max distance to ground constraint */ + /** * Distance to ground during terrain following. * If user does not demand velocity change in D-direction and the vehcile