Skip to content

Commit

Permalink
Modify code for engineer ui.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuraMumei committed Nov 26, 2023
1 parent b887c72 commit 2b3c02a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions rm_referee/include/rm_referee/ui/ui_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class UiBase
void sendCharacter(const ros::Time& time, Graph* graph);
void sendSingleGraph(const ros::Time& time, Graph* graph);
void sendInteractiveData(int data_cmd_id, int receiver_id, unsigned char data);
void sendRadarInteractiveData(rm_referee::ClientMapReceiveData& data);
void sendMapSentryData(const rm_msgs::MapSentryDataConstPtr& data);
void sendRadarInteractiveData(const rm_referee::ClientMapReceiveData& data);
void sendMapSentryData(const rm_referee::MapSentryData& data);
void sendCurrentSentryData(const rm_msgs::CurrentSentryPosDataConstPtr& data);

void sendSerial(const ros::Time& time, int data_len);
Expand Down
12 changes: 0 additions & 12 deletions rm_referee/src/referee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,18 +473,6 @@ int Referee::unpack(uint8_t* rx_data)
client_map_send_data_pub_.publish(client_map_send_data);
break;
}
/*
m_msgs::GameRobotPos game_robot_pos_data;
memcpy(&game_robot_pos_ref, rx_data + 7, sizeof(rm_referee::GameRobotPos));
game_robot_pos_data.x = game_robot_pos_ref.x;
game_robot_pos_data.y = game_robot_pos_ref.y;
game_robot_pos_data.z = game_robot_pos_ref.z;
game_robot_pos_data.yaw = game_robot_pos_ref.yaw;
game_robot_pos_pub_.publish(game_robot_pos_data);
*/
case rm_referee::POWER_MANAGEMENT_SAMPLE_AND_STATUS_DATA_CMD:
{
rm_msgs::PowerManagementSampleAndStatusData sample_and_status_pub_data;
Expand Down
4 changes: 2 additions & 2 deletions rm_referee/src/ui/ui_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void UiBase::sendUi(const ros::Time& time)
sendSingleGraph(time, graph_);
}

void UiBase::sendMapSentryData(rm_referee::MapSentryData& data)
void UiBase::sendMapSentryData(const rm_referee::MapSentryData& data)
{
uint8_t tx_data[sizeof(rm_referee::MapSentryData)] = { 0 };
auto map_sentry_data = (rm_referee::MapSentryData*)tx_data;
Expand Down Expand Up @@ -221,7 +221,7 @@ void UiBase::sendMapSentryData(rm_referee::MapSentryData& data)
clearTxBuffer();
}

void UiBase::sendRadarInteractiveData(rm_referee::ClientMapReceiveData& data)
void UiBase::sendRadarInteractiveData(const rm_referee::ClientMapReceiveData& data)
{
uint8_t tx_data[sizeof(rm_referee::ClientMapReceiveData)] = { 0 };
auto radar_interactive_data = (rm_referee::ClientMapReceiveData*)tx_data;
Expand Down

0 comments on commit 2b3c02a

Please sign in to comment.