Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rtc_interface): update cooperateStatus state transition #8883

Merged
merged 1 commit into from
Sep 17, 2024
Merged
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
5 changes: 5 additions & 0 deletions planning/autoware_rtc_interface/src/rtc_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@
return;
}

if (itr->state.type == state) {
update_status(*itr);
return;
}

Check notice on line 305 in planning/autoware_rtc_interface/src/rtc_interface.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Complex Method

RTCInterface::updateCooperateStatus increases in cyclomatic complexity from 12 to 13, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
RCLCPP_WARN_STREAM(
getLogger(), "[updateCooperateStatus] uuid : " << uuid_to_string(uuid)
<< " cannot transit from "
Expand Down
Loading