| | |
| | | #define NUM_SAMPLES 1 |
| | | #define SLEEP_START_TIME 120 |
| | | uint8_t enable_sleep_count,sleep_flag; |
| | | #define DEBUG_MODE |
| | | //#define DEBUG_MODE |
| | | struct UART_CFG_T test_uart_cfg = |
| | | { |
| | | .parity = UART_PARITY_NONE, |
| | |
| | | group_id=g_com_map[GROUP_ID]; |
| | | memcpy(&dev_id ,&g_com_map[DEV_ID],2); |
| | | tag_frequence=1000/g_com_map[COM_INTERVAL]; |
| | | g_com_map[VERSION] = (1<<8)|2; |
| | | g_com_map[VERSION] = (1<<8)|5; |
| | | LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id); |
| | | LOG_INFO(TRACE_MODULE_APP,"固件版本:UWB-标签 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff); |
| | | } |
| | |
| | | //sys_timer_open(); |
| | | |
| | | gpio_open(); |
| | | //board_led_init(); |
| | | board_led_init(); |
| | | |
| | | //uart_open(UART_ID0, &test_uart_cfg); |
| | | |
| | |
| | | //LOG_INFO(TRACE_MODULE_APP, "测距ing"); |
| | | |
| | | g_start_send_flag = 0; |
| | | |
| | | gpio_pin_set(LED_PIN);//亮 |
| | | TagRange(); |
| | | gpio_pin_clr(LED_PIN);//灭 |
| | | IdleTask(); |
| | | }else{ |
| | | IdleTask(); |