|
@@ -42,14 +42,14 @@ card_location_base::card_location_base(const std::string&type,uint32_t id,uint16
|
|
|
|
|
|
void card_location_base::do_status(int st)
|
|
void card_location_base::do_status(int st)
|
|
{
|
|
{
|
|
- time_t now=time(0);
|
|
|
|
- bool help_flag=false;
|
|
|
|
|
|
+ time_t now = time(0);
|
|
|
|
+ bool help_flag = false;
|
|
|
|
|
|
if((m_help_bit & 1) && (st & STATUS_HELP))
|
|
if((m_help_bit & 1) && (st & STATUS_HELP))
|
|
{
|
|
{
|
|
// 1111111111
|
|
// 1111111111
|
|
// ^
|
|
// ^
|
|
- m_help_last_time=now;
|
|
|
|
|
|
+ m_help_last_time = now;
|
|
}
|
|
}
|
|
else if((m_help_bit & 1) && (st & STATUS_HELP)==0)
|
|
else if((m_help_bit & 1) && (st & STATUS_HELP)==0)
|
|
{
|
|
{
|
|
@@ -112,7 +112,12 @@ void card_location_base::make_his_location(uint64_t t,const point & pt,bool bclo
|
|
scale = site_ptr->m_scale;
|
|
scale = site_ptr->m_scale;
|
|
}
|
|
}
|
|
|
|
|
|
- //m_his_location_card->push(t,pt,area_id,map_id,site_id,bclose);
|
|
|
|
|
|
+ auto mine_ptr = get_mine_tool();
|
|
|
|
+ if(m_time < mine_ptr->get_down_time())
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ m_his_location_card->push(t, pt, area_id, map_id, site_id, bclose);
|
|
m_his_location_card->insert(t, pt, area_id, map_id, site_id, scale);
|
|
m_his_location_card->insert(t, pt, area_id, map_id, site_id, scale);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -135,10 +140,12 @@ void card_location_base::on_location(const std::vector<point>&vp,const std::vect
|
|
m_acc = lm[0].m_acc;
|
|
m_acc = lm[0].m_acc;
|
|
log_info("useful loc point: type=%d, card=%d, site=%d, ct=%d, timestamp=%llu, x=%f, y=%f, speed=%.2f, acc=%.2f",m_type,m_id,sid,m_ct,m_time,x,y, m_speed, acc);
|
|
log_info("useful loc point: type=%d, card=%d, site=%d, ct=%d, timestamp=%llu, x=%f, y=%f, speed=%.2f, acc=%.2f",m_type,m_id,sid,m_ct,m_time,x,y, m_speed, acc);
|
|
do_business(lm.front().m_sit, pt, acc);
|
|
do_business(lm.front().m_sit, pt, acc);
|
|
|
|
+ int val = (lm[0].m_rav?STATUS_HELP:STATUS_NORMAL);
|
|
|
|
+ do_status(val);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- log_warn("坐标不可用:site=%d,type=%d,card=%d,ct=%d,x=%f,y=%f",sid,m_type,m_id,m_ct,pt.x,pt.y);
|
|
|
|
|
|
+ log_warn("坐标不可用:site=%d, type=%d, card=%d, ct=%d, x=%f, y=%f", sid, m_type, m_id, m_ct, pt.x, pt.y);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -219,9 +226,9 @@ void card_location_base::on_message(zloop<task*>* loop, message_pdoa_locinfo& lo
|
|
area_tool->set_site(site_ptr);
|
|
area_tool->set_site(site_ptr);
|
|
|
|
|
|
// 此条件用于解决井下有的基站不能送出电量值时,会将卡的电量值按0输出,这种情况,默认卡的电量为初始值或之前值
|
|
// 此条件用于解决井下有的基站不能送出电量值时,会将卡的电量值按0输出,这种情况,默认卡的电量为初始值或之前值
|
|
- if(loc.m_batty_status > 0){
|
|
|
|
|
|
+ //if(loc.m_batty_status > 0){
|
|
m_battery_value = loc.m_batty_status; // 电量值
|
|
m_battery_value = loc.m_batty_status; // 电量值
|
|
- }
|
|
|
|
|
|
+ //}
|
|
|
|
|
|
handle_message(loc.m_card_ct, loc.m_batty_status);
|
|
handle_message(loc.m_card_ct, loc.m_batty_status);
|
|
if(site_ptr->is_up_site()){
|
|
if(site_ptr->is_up_site()){
|