| | |
| | | } |
| | | else |
| | | { |
| | | Radio.Rx( 100 ); |
| | | Radio.Rx( 50 ); |
| | | } |
| | | } |
| | | extern LPTIM_HandleTypeDef hlptim1; |
| | |
| | | uint16_t rec_value,rec_delaytime,rx_count; |
| | | uint16_t rec_value,rec_delaytime,rx_count,datalen_offset; |
| | | int32_t target_count; |
| | | uint8_t shengji_flag; |
| | | uint8_t shengji_flag,time=5; |
| | | extern uint32_t uwbled,gpsled,loraled,powerled; |
| | | void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) |
| | | { uint16_t checksum1; |
| | |
| | | lora_up_rec_flag=1; |
| | | if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_RANGEPOLL) |
| | | { |
| | | UWB_Wkup(); |
| | | MbxTagUwbRec(); |
| | | UWB_RXStart(10); |
| | | delay_ms(time); |
| | | HAL_GPIO_WritePin(RADIO_NSS_GPIO_Port, RADIO_NSS_Pin, GPIO_PIN_RESET); //片选lora有效 |
| | | } |
| | | if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG) |
| | |
| | | } |
| | | if(!no_rx_flag&&LoraUp_flag==0) |
| | | { |
| | | if(RX_Buffer[MSG_TYPE_IDX]!=LORA_MSGTYPE_RANGEPOLL) |
| | | SwitchLoraSettings(UWB_CHANNEL_FRQ+g_com_map[GROUP_ID],UWB_CHANNEL_SF,0); |
| | | Radio.Rx(0); |
| | | } |