mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 20:13:33 +08:00
making code more robust
This commit is contained in:
committed by
Lorenz Meier
parent
6ff1b2d896
commit
f2777cb6ee
@@ -447,7 +447,7 @@ MissionBlock::set_follow_target_item(struct mission_item_s *item, float min_clea
|
||||
|
||||
item->lat = target.lat;
|
||||
item->lon = target.lon;
|
||||
item->altitude = target.alt;
|
||||
item->altitude = target.alt + _navigator->get_home_position()->alt;
|
||||
|
||||
if (((min_clearance > 0.0f) && (item->altitude < _navigator->get_home_position()->alt + min_clearance)) || PX4_ISFINITE(target.alt)) {
|
||||
item->altitude = _navigator->get_home_position()->alt + min_clearance;
|
||||
|
||||
Reference in New Issue
Block a user