From a337ddf612cef7528638972be439564d14a1a8b8 Mon Sep 17 00:00:00 2001 From: Simone Guscetti Date: Tue, 13 Nov 2018 16:53:36 +0100 Subject: [PATCH] FlightTask: use convetion for definition of the landing gear default value --- src/lib/FlightTasks/FlightTasks.cpp | 2 +- src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp | 4 ++-- src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/FlightTasks/FlightTasks.cpp b/src/lib/FlightTasks/FlightTasks.cpp index 0a51add41789..dec5fa00effb 100644 --- a/src/lib/FlightTasks/FlightTasks.cpp +++ b/src/lib/FlightTasks/FlightTasks.cpp @@ -53,7 +53,7 @@ const landing_gear_s FlightTasks::getGear() return _current_task.task->getGear(); } else { - return FlightTask::landing_gear_default_keep; + return FlightTask::empty_landing_gear_default_keep; } } diff --git a/src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp b/src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp index 7e9f9a8a6993..2a1c81a87bc9 100644 --- a/src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp +++ b/src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp @@ -7,7 +7,7 @@ constexpr uint64_t FlightTask::_timeout; const vehicle_local_position_setpoint_s FlightTask::empty_setpoint = {0, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, {NAN, NAN, NAN}}; const vehicle_constraints_s FlightTask::empty_constraints = {0, NAN, NAN, NAN, NAN, NAN, NAN, NAN, {}}; -const landing_gear_s FlightTask::landing_gear_default_keep = {0, landing_gear_s::GEAR_KEEP, {}}; +const landing_gear_s FlightTask::empty_landing_gear_default_keep = {0, landing_gear_s::GEAR_KEEP, {}}; const vehicle_trajectory_waypoint_s FlightTask::empty_trajectory_waypoint = {0, 0, {0, 0, 0, 0, 0, 0, 0}, { {0, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, NAN, NAN, false, {0, 0, 0}}, {0, {NAN, NAN, NAN}, {NAN, NAN, NAN}, {NAN, NAN, NAN}, NAN, NAN, false, {0, 0, 0}}, @@ -36,7 +36,7 @@ bool FlightTask::activate() _setDefaultConstraints(); _time_stamp_activate = hrt_absolute_time(); _heading_reset_counter = _sub_attitude->get().quat_reset_counter; - _gear = landing_gear_default_keep; + _gear = empty_landing_gear_default_keep; return true; } diff --git a/src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp b/src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp index b19d37506eb3..7e5956be1203 100644 --- a/src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp +++ b/src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp @@ -143,7 +143,7 @@ class FlightTask : public ModuleParams /** * default landing gear state */ - static const landing_gear_s landing_gear_default_keep; + static const landing_gear_s empty_landing_gear_default_keep; /** * Empty desired waypoints.