| | |
| | | uint32_t lora_zhuangtai; |
| | | uint16_t current_count; |
| | | extern wg_state_enum wg_state; |
| | | extern u8 uwb_rxflag; |
| | | void OnTxDone( void ) |
| | | { |
| | | if(flag_writepara_needreset) //配置写入完成设备需要重启 |
| | |
| | | } |
| | | else |
| | | { |
| | | Radio.Rx( 50 ); |
| | | if(uwb_rxflag) |
| | | { |
| | | uwb_rxflag=0; |
| | | UWB_RXOFF(); |
| | | Radio.Rx( 50 ); |
| | | } |
| | | else |
| | | { |
| | | Radio.Rx( 50 ); |
| | | } |
| | | } |
| | | } |
| | | extern LPTIM_HandleTypeDef hlptim1; |
| | |
| | | int32_t target_count; |
| | | uint8_t shengji_flag,time=5; |
| | | extern uint32_t uwbled,gpsled,loraled,powerled; |
| | | uint8_t test_lora_flag; |
| | | void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) |
| | | { uint16_t checksum1; |
| | | BufferSize = size; |
| | |
| | | { |
| | | wg_state = WG_Connected; |
| | | wg_report_id = source_id; |
| | | test_lora_flag=1; |
| | | } |
| | | if(!memcmp(&wg_report_id,&RX_Buffer[SOURCE_ID_IDX],2)) |
| | | { |
| | |
| | | } |
| | | HAL_GPIO_WritePin(GPIOC, GPIO_PIN_7, GPIO_PIN_SET); |
| | | HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET); |
| | | memcpy(&xiafayuyin_data,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],BufferSize-PWTAG_WRITE_VALUE_IDX); |
| | | memcpy(&xiafayuyin_data,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],BufferSize-PWTAG_WRITE_VALUE_IDX-2); |
| | | yuyin_sendflag=1; |
| | | yuyinzidongguan_time=0; |
| | | yuyin_no_sleep_flag=1; |