| | |
| | | // g_com_map[DEV_ROLE]=1; |
| | | // g_com_map[DEV_ID]=1; |
| | | // g_com_map[COM_INTERVAL]=10; |
| | | OUT485_ENABLE; |
| | | g_com_map[VERSION] = 0x0103; |
| | | if(g_com_map[DEV_ROLE]) |
| | | { |
| | | tyncpoll_time=g_com_map[DEV_ID]*g_com_map[MAX_REPORT_ANC_NUM]*4/3; |
| | |
| | | printf("åºç«ç±»å: %c .\r\n",anchor_type+0x41); |
| | | printf("忬¡é讯åºç«æ°é: %d个.\r\n",g_com_map[MAX_REPORT_ANC_NUM]); |
| | | } |
| | | OUT485_DISABLE; |
| | | // printf("DEVICE PAIRID: %d .\r\n",g_com_map[PAIR_ID]); |
| | | // printf("DEVICE ALARM DISTANCE: 1.%d 2.%d 3.%d .\r\n",g_com_map[ALARM_DISTANCE1],g_com_map[ALARM_DISTANCE2],g_com_map[ALARM_DISTANCE3]); |
| | | |
| | |
| | | |
| | | Device_Init(); |
| | | Program_Init(); |
| | | //Dw1000_Init(); |
| | | Dw1000_Init(); |
| | | delay_ms(10); |
| | | Dw1000_App_Init(); |
| | | /* Loop forever initiating ranging exchanges. */ |
| | | RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); |
| | | usart_send[0]=0x55; |
| | | usart_send[1]=0xAA; |
| | | UART_PushFrame(hbsend,16); |
| | | |
| | | while(1) |
| | | { |
| | | IdleTask(); |