| | |
| | | } |
| | | #define BIND_COUNT_NUM 50 |
| | | uint8_t bind_flag,bind_count=BIND_COUNT_NUM; |
| | | extern uint8_t find_flag; |
| | | void SecondTask(void) |
| | | {static uint8_t second_count; |
| | | if(second_count++>60) |
| | |
| | | if(bind_count--<=0) |
| | | { |
| | | bind_count=BIND_COUNT_NUM; |
| | | copy_taglist_to_flash(); |
| | | bind_flag=0; |
| | | } |
| | | } |
| | |
| | | parameter_init_anchor();//g_com_map表初始化角色默认为基站 |
| | | dev_id=g_com_map[DEV_ID];//这里不太对 |
| | | group_id=g_com_map[GROUP_ID];//组ID |
| | | // tag_frequency = 1000/g_com_map[COM_INTERVAL];//测距频率这个存的是测距时间 |
| | | memcpy(&disoffset,&g_com_map[DIST_OFFSET],2); |
| | | // g_com_map[ALARM_DISTANCE1] = 40; |
| | | // g_com_map[ALARM_DISTANCE2] = 40; |
| | | warning_distance=g_com_map[ALARM_DISTANCE1]; |
| | | prewarning_distance=g_com_map[ALARM_DISTANCE2]; |
| | | send_struct.warnDistence=warning_distance; |