zhuyf 2 лет назад
Родитель
Сommit
04b61b8138
1 измененных файлов с 7 добавлено и 5 удалено
  1. 7 5
      card_car.cpp

+ 7 - 5
card_car.cpp

@@ -217,17 +217,19 @@ void car::handle_anti_coll(const point& pt, const int& sid)
         event_tool::instance()->handle_event(OT_CARD, ET_PERSON_VEHICLE_ANTI_COLLISION, id, 0, 0, false);
     }else{
         size_t i = 0;
+		desc = "[";
         for(auto c : cd)
         {
             desc += std::to_string(c.first);
             std::ostringstream buf;
             buf<<c.second;
             desc += "," + buf.str();
-            if(i != (cards.size() - 1)){
-                desc += ";";
-            }
+            //if(i != (cards.size() - 1)){
+            //    desc += ";";
+            //}
             ++i;
         }
+		desc += "]"
         log_info("[anti_coll] the distance's list between person and vehicle : %s", desc.c_str());
 		event_tool::instance()->handle_event(OT_CARD, ET_PERSON_VEHICLE_ANTI_COLLISION, id, min_d, cur_v, true, DT_COMMON, desc);
     }
@@ -299,7 +301,7 @@ void car::on_timer()
 	    make_package();
 
 	//1.找到73号卡,如果计数小于100,更新速度为40;计数大于100,更新速度为20
-/*	if(m_cache_nums < 40){
+	if(m_cache_nums < 40){
 		m_cache_nums++;
 		m_speed = 40;
 	}else{
@@ -308,7 +310,7 @@ void car::on_timer()
 
 	log_info("[v_over_speed] card_id=10004, speed=%.2f", m_speed);
 	handle_over_speed();
-*/
+
 	//2.调用业务处理
 }