mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
Navigator: remove ununsed argument from set_land_item()
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -50,7 +50,7 @@ void
|
|||||||
Land::on_activation()
|
Land::on_activation()
|
||||||
{
|
{
|
||||||
/* set current mission item to Land */
|
/* set current mission item to Land */
|
||||||
set_land_item(&_mission_item, true);
|
set_land_item(&_mission_item);
|
||||||
_navigator->get_mission_result()->finished = false;
|
_navigator->get_mission_result()->finished = false;
|
||||||
_navigator->set_mission_result_updated();
|
_navigator->set_mission_result_updated();
|
||||||
reset_mission_item_reached();
|
reset_mission_item_reached();
|
||||||
|
|||||||
@@ -831,7 +831,7 @@ MissionBlock::set_takeoff_item(struct mission_item_s *item, float abs_altitude)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_location)
|
MissionBlock::set_land_item(struct mission_item_s *item)
|
||||||
{
|
{
|
||||||
/* VTOL transition to RW before landing */
|
/* VTOL transition to RW before landing */
|
||||||
if (_navigator->force_vtol()) {
|
if (_navigator->force_vtol()) {
|
||||||
@@ -846,18 +846,9 @@ MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_locatio
|
|||||||
/* set the land item */
|
/* set the land item */
|
||||||
item->nav_cmd = NAV_CMD_LAND;
|
item->nav_cmd = NAV_CMD_LAND;
|
||||||
|
|
||||||
/* use current position */
|
item->lat = (double)NAN; //descend at current position
|
||||||
if (at_current_location) {
|
item->lon = (double)NAN; //descend at current position
|
||||||
item->lat = (double)NAN; //descend at current position
|
item->yaw = _navigator->get_local_position()->heading;
|
||||||
item->lon = (double)NAN; //descend at current position
|
|
||||||
item->yaw = _navigator->get_local_position()->heading;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* use home position */
|
|
||||||
item->lat = _navigator->get_home_position()->lat;
|
|
||||||
item->lon = _navigator->get_home_position()->lon;
|
|
||||||
item->yaw = _navigator->get_home_position()->yaw;
|
|
||||||
}
|
|
||||||
|
|
||||||
item->altitude = 0;
|
item->altitude = 0;
|
||||||
item->altitude_is_relative = false;
|
item->altitude_is_relative = false;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ protected:
|
|||||||
/**
|
/**
|
||||||
* Set a land mission item
|
* Set a land mission item
|
||||||
*/
|
*/
|
||||||
void set_land_item(struct mission_item_s *item, bool at_current_location);
|
void set_land_item(struct mission_item_s *item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set idle mission item
|
* Set idle mission item
|
||||||
|
|||||||
Reference in New Issue
Block a user