Skip to content

Commit

Permalink
ensure actual prepare duration is always above minimum prepare durati…
Browse files Browse the repository at this point in the history
…on threshold

Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
  • Loading branch information
mkquda committed Dec 24, 2024
1 parent a382a0e commit 78b1182
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ double calc_actual_prepare_duration(
if (max_acc < eps) {
return params.max_prepare_duration;
}
return (min_lc_velocity - current_velocity) / max_acc;
return std::max((min_lc_velocity - current_velocity) / max_acc, params.min_prepare_duration);
});

return std::max(params.max_prepare_duration - active_signal_duration, min_prepare_duration);
Expand Down

0 comments on commit 78b1182

Please sign in to comment.