| | |
| | | RadioIrqProcess(); |
| | | } |
| | | } |
| | | u16 poll_startcount; |
| | | u16 poll_startcount; |
| | | u16 Anchor_Vcc_time1; |
| | | uint8_t TX_Anchor_Vcc[100]={0x55,0xAA,0x14,20,0,0/*标签id*/,0,0/*基站ID*/,0/*保留*/,}; |
| | | extern float bat_volt; |
| | |
| | | /* USER CODE END WHILE */ |
| | | |
| | | /* USER CODE BEGIN 3 */ |
| | | Send_Anchor_Vcc_Poll(); |
| | | // Send_Anchor_Vcc_Poll(); |
| | | if(g_start_send_flag) |
| | | { static uint16_t blink_count=0; |
| | | SystemClock_Config(); |
| | |
| | | HAL_IWDG_Refresh(&hiwdg); |
| | | |
| | | |
| | | memcpy(&TX_Buffer+3,&tx_num,1); |
| | | // printf("Lora发送%d",tx_num); |
| | | HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, GPIO_PIN_SET); |
| | | // poll_startcount=HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // poll_startcount=poll_startcount+557;//557代表17ms |
| | | // if(poll_startcount>=32768) |
| | | // { |
| | | // poll_startcount -=32768; |
| | | // } |
| | | Radio.Send( &TX_Buffer, 4); |
| | | HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_SET); |
| | | UWB_Wkup(); |
| | | delay_us(700); |
| | | |
| | | // HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, GPIO_PIN_SET); |
| | | |
| | | |
| | | // HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_SET); |
| | | // Radio.Send( &TX_Buffer, 4); |
| | | // UWB_Wkup(); |
| | | // delay_us(700); |
| | | if(bat_percent>15) |
| | | { |
| | | LED_TB_ON; |