Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AirLib/src/vehicles/multirotor/api/MultirotorApiBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ namespace airlib
//if auto mode requested for lookahead then calculate based on velocity
float command_period_dist = velocity * getCommandPeriod();
float lookahead = command_period_dist * (adaptive_lookahead > 0 ? min_factor : max_factor);
lookahead = std::max(lookahead, getDistanceAccuracy() * 1.5f); //50% more than distance accuracy
// Parenthesize std::max so MSVC Windows min/max macros cannot break this call.
lookahead = (std::max)(lookahead, getDistanceAccuracy() * 1.5f); //50% more than distance accuracy
return lookahead;
}

Expand Down