navigator: bring follow me back to life

The function `mission_item_to_position_setpoint()` is called in
`FollowTarget::update_position_sp()`. The nav_cmd is a
NAV_CMD_DO_FOLLOW_REPOSITION as set earlier in `set_follow_target_item`.

Since `mission_item_to_position_setpointi` returns early because the item
presumably contains no position, the lat/lon of the mission_item are
not copied over to the position_setpoint and therefore the vehicle will
never move in follow me position mode.
This commit is contained in:
Julian Oes 2017-10-27 16:48:39 -04:00 committed by Lorenz Meier
parent 10de946cdf
commit 6d8d6323cb

View File

@ -475,7 +475,8 @@ MissionBlock::item_contains_position(const mission_item_s &item)
item.nav_cmd == NAV_CMD_TAKEOFF ||
item.nav_cmd == NAV_CMD_LOITER_TO_ALT ||
item.nav_cmd == NAV_CMD_VTOL_TAKEOFF ||
item.nav_cmd == NAV_CMD_VTOL_LAND;
item.nav_cmd == NAV_CMD_VTOL_LAND ||
item.nav_cmd == NAV_CMD_DO_FOLLOW_REPOSITION;
}
bool