Skip to content

Commit

Permalink
FlightTask: use convetion for definition of the landing gear default …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
Simone Guscetti authored and MaEtUgR committed Nov 14, 2018
1 parent fd36e7c commit a337ddf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/FlightTasks/FlightTasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/FlightTasks/tasks/FlightTask/FlightTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}},
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/FlightTasks/tasks/FlightTask/FlightTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a337ddf

Please sign in to comment.