Skip to content

Commit

Permalink
feat: add pull over to autoware_state_panel of rviz
Browse files Browse the repository at this point in the history
Signed-off-by: TetsuKawa <[email protected]>
  • Loading branch information
TetsuKawa committed Mar 4, 2024
1 parent 56ad4b4 commit b64c679
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,11 @@ void AutowareStatePanel::onMRMState(const MRMState::ConstSharedPtr msg)
style_sheet = "background-color: #00FF00;"; // green
break;

case MRMState::PULL_OVER:
text = "PULL_OVER";
style_sheet = "background-color: #FFFF00;"; // yellow

Check warning on line 507 in common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp

View check run for this annotation

Codecov / codecov/patch

common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp#L505-L507

Added lines #L505 - L507 were not covered by tests
break;

Check warning on line 509 in common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

AutowareStatePanel::onMRMState increases in cyclomatic complexity from 10 to 11, 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.
case MRMState::COMFORTABLE_STOP:
text = "COMFORTABLE_STOP";
style_sheet = "background-color: #FFFF00;"; // yellow
Expand Down

0 comments on commit b64c679

Please sign in to comment.