Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions rm_msgs/msg/referee/BulletAllowance.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
uint16 bullet_allowance_num_17_mm
uint16 bullet_allowance_num_42_mm
uint16 coin_remaining_num
uint16 projectile_allowance_fortress

time stamp
1 change: 1 addition & 0 deletions rm_msgs/msg/referee/EventData.msg
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ uint8 trapezoidal_elevated_ground_state
uint16 be_hit_time
uint8 be_hit_target
uint8 central_point_state
uint8 own_fortress_state

time stamp
1 change: 1 addition & 0 deletions rm_msgs/msg/referee/RfidStatus.msg
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ bool overlapping_supplier_zone
bool own_large_resource_island_point
bool enemy_large_resource_island_point
bool central_buff_point
bool enemy_fortress_buff_point

time stamp
7 changes: 5 additions & 2 deletions rm_referee/include/rm_referee/common/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ typedef struct
uint16_t be_hit_time : 9;
uint8_t be_hit_target : 3;
uint8_t central_point_state : 2;
uint16_t reserved : 9;
uint8_t own_fortress_state : 2;
uint8_t reserved : 7;
} __packed EventData;

typedef struct
Expand Down Expand Up @@ -388,6 +389,7 @@ typedef struct
uint16_t bullet_allowance_num_17_mm;
uint16_t bullet_allowance_num_42_mm;
uint16_t coin_remaining_num;
uint16_t projectile_allowance_fortress;
} __packed BulletAllowance;

typedef struct
Expand Down Expand Up @@ -416,7 +418,8 @@ typedef struct
uint8_t own_large_resource_island_point : 1;
uint8_t enemy_large_resource_island_point : 1;
uint8_t central_buff_point : 1;
uint32_t reversed : 8;
uint8_t enemy_fortress_buff_point : 1;
uint8_t reversed : 7;
} __packed RfidStatus;

typedef struct
Expand Down
3 changes: 3 additions & 0 deletions rm_referee/src/referee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ int Referee::unpack(uint8_t* rx_data)
event_data.be_hit_time = event_ref.be_hit_time;
event_data.be_hit_target = event_ref.be_hit_target;
event_data.central_point_state = event_ref.central_point_state;
event_data.own_fortress_state = event_ref.own_fortress_state;
event_data.stamp = last_get_data_time_;

event_data_pub_.publish(event_data);
Expand Down Expand Up @@ -369,6 +370,7 @@ int Referee::unpack(uint8_t* rx_data)
bullet_allowance_data.bullet_allowance_num_17_mm = bullet_allowance_ref.bullet_allowance_num_17_mm;
bullet_allowance_data.bullet_allowance_num_42_mm = bullet_allowance_ref.bullet_allowance_num_42_mm;
bullet_allowance_data.coin_remaining_num = bullet_allowance_ref.coin_remaining_num;
bullet_allowance_data.projectile_allowance_fortress = bullet_allowance_ref.projectile_allowance_fortress;
bullet_allowance_data.stamp = last_get_data_time_;
referee_ui_.bulletRemainDataCallBack(bullet_allowance_data, last_get_data_time_);

Expand Down Expand Up @@ -419,6 +421,7 @@ int Referee::unpack(uint8_t* rx_data)
rfid_status_data.own_large_resource_island_point = rfid_status_ref.own_large_resource_island_point;
rfid_status_data.enemy_large_resource_island_point = rfid_status_ref.enemy_large_resource_island_point;
rfid_status_data.central_buff_point = rfid_status_ref.central_buff_point;
rfid_status_data.enemy_fortress_buff_point = rfid_status_ref.enemy_fortress_buff_point;
rfid_status_data.stamp = last_get_data_time_;

rfid_status_pub_.publish(rfid_status_data);
Expand Down
Loading