From 4170266b0f0e779d0c1dcbe519e3307e9f2cde7a Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期一, 22 一月 2024 15:33:15 +0800 Subject: [PATCH] 增加同步部分代码,未测试 --- Src/main.c | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Src/main.c b/Src/main.c index 3f79808..abab4af 100644 --- a/Src/main.c +++ b/Src/main.c @@ -371,7 +371,7 @@ 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; @@ -466,7 +466,7 @@ /* 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(); @@ -474,19 +474,14 @@ 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; -- Gitblit v1.9.3