| | |
| | | #endif |
| | | OUT485_ENABLE; |
| | | ComMapCheck(); |
| | | g_com_map[VERSION] = 0x021e; |
| | | g_com_map[VERSION] = 0x022b; |
| | | dev_id = g_com_map[DEV_ID]; |
| | | slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*SLOT_SCALE)+3; |
| | | max_slotpos=g_com_map[COM_INTERVAL]/slottime; |
| | |
| | | memcpy(&hbsend[14],&checksum,2); |
| | | UART_PushFrame(hbsend,16); |
| | | } |
| | | u32 onesecondtimer; |
| | | void OneSecondTask(void) |
| | | { |
| | | TagListUpdate(); |
| | | TagDistClear(); |
| | | } |
| | | extern u8 g_start_sync_flag,usart_send_flag,anc_report_num; |
| | | u16 heartbeat_timer=58,poll_timer; |
| | | int16_t sync_timer; |
| | |
| | | if(g_com_map[HEARTBEAT]&&g_com_map[DEV_ROLE]==0) |
| | | HeatBeat(); |
| | | } |
| | | if(time32_incr-onesecondtimer>=1000) |
| | | { |
| | | onesecondtimer = time32_incr; |
| | | OneSecondTask(); |
| | | } |
| | | // if(flag_newsecond) |
| | | // { |
| | | // flag_newsecond=0; |