lixioayao 6 år sedan
förälder
incheckning
13de702069
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 1 1
      message.cpp
  2. 3 3
      net-service.cpp

+ 1 - 1
message.cpp

@@ -54,7 +54,7 @@ void message_locinfo::load(zistream&is,bool tdoa)
 	uint16_t sp1=0,sp2=0;
 	is>>sp1>>sp2;
 	m_rssi=10*log10(1.*sp1*(1<<17)/pow(sp2-64.,2))-121.74;
-	log_info("timestamp=%llu,type:%d,card_id:%d,ct:%d,status:%d,acc=%d,tof=%llu,ant_id:%d,spq=%d",m_time_stamp,m_card_type,m_card_id,m_card_ct,m_batty_status,m_acc,m_tof,m_ant_id,m_rssi);
+	log_info("timestamp=%llu,type:%d,card_id:%d,site:%d,ct:%d,status:%d,acc=%d,tof=%llu,ant_id:%d,spq=%d",m_time_stamp,m_card_type,m_card_id,m_site_id,m_card_ct,m_batty_status,m_acc,m_tof,m_ant_id,m_rssi);
 }
 
 void message_tdoasync::zero_this()

+ 3 - 3
net-service.cpp

@@ -88,15 +88,15 @@ void net_service::on_message(std::shared_ptr<client> clt,const char*data,size_t
 						index++;
 						task*t=task::alloc<message_locinfo>();
 						message_locinfo&m=t->body<message_locinfo>();
+						m.m_site_id=site_id;
 						m.load(is,false);
 						m.m_time_stamp=tstamp;
-						m.m_site_id=site_id;
 						//t_site->m_site_data = 0;
 
 						t->m_cmd_code=cmd;
 						t->m_hash_id=m.m_card_id;
 						if(m.m_card_type==5)
-							mine_business::inst()->make_reverse_condition(m.m_card_type,m.m_card_id,m.m_ant_id,m.m_card_ct,m.m_tof,m.m_site_id);
+						mine_business::inst()->make_reverse_condition(m.m_card_type,m.m_card_id,m.m_ant_id,m.m_card_ct,m.m_tof,m.m_site_id);
 						m_loc_worker->request(t);
 					}
 				}
@@ -109,8 +109,8 @@ void net_service::on_message(std::shared_ptr<client> clt,const char*data,size_t
 					{
 						task*t=task::alloc<message_locinfo>();
 						message_locinfo&m=t->body<message_locinfo>();
-						m.load(is,true);
 						m.m_site_id=site_id;
+						m.load(is,true);
 						t->m_cmd_code=cmd;
 						t->m_hash_id=m.m_card_id;
 						m_sync_worker->translate(m);