Skip to content

Commit

Permalink
fix(autoware_pid_longitudinal_controller): fix bugprone-branch-clone (#…
Browse files Browse the repository at this point in the history
…9629)

fix: bugprone-branch-clone

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Dec 12, 2024
1 parent 46cfadb commit 413805a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ double SmoothStop::calculate(
// when the car is running
if (is_running) {
// when the car will not stop in a certain time
if (time_to_stop && *time_to_stop > m_params.weak_stop_time + delay_time) {
return m_strong_acc;
} else if (!time_to_stop && is_fast_vel) {
if (
(time_to_stop && *time_to_stop > m_params.weak_stop_time + delay_time) ||
(!time_to_stop && is_fast_vel)) {
return m_strong_acc;
}

Expand Down

0 comments on commit 413805a

Please sign in to comment.