Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Go Sakayori <[email protected]>
  • Loading branch information
go-sakayori committed Sep 11, 2024
1 parent ccc9eaf commit 5555b6a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
42 changes: 21 additions & 21 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ RTCManagerPanel::RTCManagerPanel(QWidget * parent) : rviz_common::Panel(parent)
rtc_table_ = new QTableWidget();
rtc_table_->setColumnCount(column_size_);
rtc_table_->setHorizontalHeaderLabels(
{"ID", "Module", "AW Safe", "Received Cmd", "AutoMode", "State", "StartDistance", "FinishDistance"});
{"ID", "Module", "AW\nSafe", "Recv\nCmd", "Auto\nMode", "State", "Start\nDistance",
"Finish\nDistance"});
rtc_table_->setVerticalHeader(vertical_header);
rtc_table_->setHorizontalHeader(horizontal_header);
rtc_table_layout->addWidget(rtc_table_);
Expand Down Expand Up @@ -441,30 +442,29 @@ void RTCManagerPanel::onRTCStatus(const CooperateStatusArray::ConstSharedPtr msg
// State
std::string module_state = "NONE";

Check warning on line 443 in common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp

View check run for this annotation

Codecov / codecov/patch

common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp#L443

Added line #L443 was not covered by tests
{
switch (status.state.type)
{
case State::WAITING_FOR_EXECUTION:
module_state = "Waiting";
break;
case State::RUNNING:
module_state = "Running";
break;
case State::ABORTING:
module_state = "Aborting";
break;
case State::SUCCEEDED:
module_state = "Succeeded";
break;
case State::FAILED:
module_state = "Failed";
break;
default:
break;
switch (status.state.type) {

Check warning on line 445 in common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp

View check run for this annotation

Codecov / codecov/patch

common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp#L445

Added line #L445 was not covered by tests
case State::WAITING_FOR_EXECUTION:
module_state = "Waiting";
break;
case State::RUNNING:
module_state = "Running";
break;
case State::ABORTING:
module_state = "Aborting";
break;
case State::SUCCEEDED:
module_state = "Succeeded";
break;
case State::FAILED:
module_state = "Failed";
break;
default:
break;
}
auto label = new QLabel(QString::fromStdString(module_state));
label->setAlignment(Qt::AlignCenter);
label->setText(QString::fromStdString(module_state));
rtc_table_->setCellWidget(cnt, 5 , label);
rtc_table_->setCellWidget(cnt, 5, label);

Check warning on line 467 in common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp

View check run for this annotation

Codecov / codecov/patch

common/rtc_manager_rviz_plugin/src/rtc_manager_panel.cpp#L464-L467

Added lines #L464 - L467 were not covered by tests
}

// start distance
Expand Down
4 changes: 2 additions & 2 deletions common/rtc_manager_rviz_plugin/src/rtc_manager_panel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include <tier4_rtc_msgs/msg/cooperate_status.hpp>
#include <tier4_rtc_msgs/msg/cooperate_status_array.hpp>
#include <tier4_rtc_msgs/msg/module.hpp>
#include <tier4_rtc_msgs/msg/state.hpp>
#include <tier4_rtc_msgs/srv/auto_mode.hpp>
#include <tier4_rtc_msgs/srv/cooperate_commands.hpp>
#include <tier4_rtc_msgs/msg/state.hpp>
#endif

namespace rviz_plugins
Expand All @@ -54,9 +54,9 @@ using tier4_rtc_msgs::msg::CooperateResponse;
using tier4_rtc_msgs::msg::CooperateStatus;
using tier4_rtc_msgs::msg::CooperateStatusArray;
using tier4_rtc_msgs::msg::Module;
using tier4_rtc_msgs::msg::State;
using tier4_rtc_msgs::srv::AutoMode;
using tier4_rtc_msgs::srv::CooperateCommands;
using tier4_rtc_msgs::msg::State;
using unique_identifier_msgs::msg::UUID;

static const QString BG_BLUE = "background-color: #3dffff;";
Expand Down

0 comments on commit 5555b6a

Please sign in to comment.