Navigator: remove ununsed argument from set_land_item()

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-01-25 14:28:14 +01:00
parent 1fb6b003fc
commit eaa4180920
3 changed files with 6 additions and 15 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ void
Land::on_activation()
{
/* set current mission item to Land */
set_land_item(&_mission_item, true);
set_land_item(&_mission_item);
_navigator->get_mission_result()->finished = false;
_navigator->set_mission_result_updated();
reset_mission_item_reached();
+4 -13
View File
@@ -831,7 +831,7 @@ MissionBlock::set_takeoff_item(struct mission_item_s *item, float abs_altitude)
}
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 */
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 */
item->nav_cmd = NAV_CMD_LAND;
/* use current position */
if (at_current_location) {
item->lat = (double)NAN; //descend at current position
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->lat = (double)NAN; //descend at current position
item->lon = (double)NAN; //descend at current position
item->yaw = _navigator->get_local_position()->heading;
item->altitude = 0;
item->altitude_is_relative = false;
+1 -1
View File
@@ -164,7 +164,7 @@ protected:
/**
* 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