Skip to content

Commit

Permalink
AP_Scripting: fixed NaN in path lookahead at end of schedule
Browse files Browse the repository at this point in the history
this can happen at high speedups under SITL
  • Loading branch information
tridge committed Mar 16, 2024
1 parent 2726163 commit ece61c2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2717,8 +2717,10 @@ function do_path()
lookahead_bf_dps:y(),
path_rate_bf_dps:z(),
lookahead_bf_dps:z())
path_rate_bf_dps:y(lookahead_bf_dps:y())
path_rate_bf_dps:z(lookahead_bf_dps:z())
if not Vec3IsNaN(lookahead_bf_dps) then
path_rate_bf_dps:y(lookahead_bf_dps:y())
path_rate_bf_dps:z(lookahead_bf_dps:z())
end
end

--[[
Expand Down

0 comments on commit ece61c2

Please sign in to comment.