AP_Scripting: fixed NaN in path lookahead at end of schedule

this can happen at high speedups under SITL
This commit is contained in:
Andrew Tridgell 2024-03-16 10:57:33 +11:00
parent 27261639d7
commit ece61c29d5

View File

@ -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
--[[