|
@@ -318,20 +318,46 @@ Error_manager System_executor::encapsulate_send_status()
|
|
|
t_locate_information.set_uniformed_car_y(t_car_wheel_information.uniform_car_y);
|
|
|
t_multi_status_msg.mutable_locate_information_realtime()->CopyFrom(t_locate_information);
|
|
|
// 当前超界提示仅保留一项
|
|
|
+ // 20211026已修改,分离为电子围栏状态与超界状态,只有测量正确时超界状态才有意义
|
|
|
+ t_multi_status_msg.set_border_status(t_car_wheel_information.range_status);
|
|
|
if(!t_car_wheel_information.correctness)
|
|
|
{
|
|
|
if(t_region_cloud->size() > 0)
|
|
|
t_multi_status_msg.set_ground_status(message::Ground_statu::Noise);
|
|
|
else
|
|
|
t_multi_status_msg.set_ground_status(message::Ground_statu::Nothing);
|
|
|
- }else if(t_car_wheel_information.range_status & Ground_region::Range_status::Range_left != 0)
|
|
|
+ }else if(t_car_wheel_information.range_status == int(Ground_region::Range_status::Range_correct))
|
|
|
{
|
|
|
- t_multi_status_msg.set_ground_status(message::Ground_statu::Car_left_out);
|
|
|
- }else if(t_car_wheel_information.range_status & Ground_region::Range_status::Range_right != 0)
|
|
|
- {
|
|
|
- t_multi_status_msg.set_ground_status(message::Ground_statu::Car_right_out);
|
|
|
- }else{
|
|
|
t_multi_status_msg.set_ground_status(message::Ground_statu::Car_correct);
|
|
|
+ }else {
|
|
|
+ t_multi_status_msg.set_ground_status(message::Ground_statu::Car_border_reached);
|
|
|
+ // 更新待提示错误信息
|
|
|
+ std::string t_error_str;
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_front != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("前超界 ");
|
|
|
+ }
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_back != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("后超界 ");
|
|
|
+ }
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_left != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("左超界 ");
|
|
|
+ }
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_right != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("右超界 ");
|
|
|
+ }
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_bottom != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("底盘超界 ");
|
|
|
+ }
|
|
|
+ if (t_car_wheel_information.range_status & Ground_region::Range_status::Range_top != 0)
|
|
|
+ {
|
|
|
+ t_error_str.append("顶超界 ");
|
|
|
+ }
|
|
|
+ t_error.set_error_description(t_error_str);
|
|
|
}
|
|
|
|
|
|
t_multi_status_msg.mutable_error_manager()->set_error_code(t_error.get_error_code());
|