From db36f74f33fca1df7b2ac72e54178db4d14b00a2 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期五, 07 二月 2025 10:12:46 +0800
Subject: [PATCH] 2.11,修改重启bug当周围防撞标签多的时候

---
 Src/main.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Src/main.c b/Src/main.c
index 247a5e8..b823004 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -31,7 +31,7 @@
 
 #define NSH1 0x0001
 #define GP   0x0002
-//#define DEBUG_MODE
+#define DEBUG_MODE
 /* USER CODE END Includes */
 
 /* Private typedef -----------------------------------------------------------*/
@@ -134,7 +134,7 @@
     bat_percent=Get_Battary();
 	if(HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin))
 	{
-		nomove_count = 0;
+//		nomove_count = 0;
 		if(state5v==0)
 		{
             UWB_RXOFF();
@@ -236,7 +236,7 @@
 	hardware_pici= STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+2);
 	hardware_type= STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+4);
 	//deca_sleep(1000);
-	g_com_map[VERSION] = (2<<8)|7;
+	g_com_map[VERSION] = (2<<8)|11;
     
 //	g_com_map[DEV_ID]=0x7;
 #ifdef DEBUG_MODE
@@ -457,7 +457,7 @@
 				HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);  
 #endif
 			}
-		if(g_start_send_flag&&uwb_onflag)
+		if(g_start_send_flag/*&&uwb_onflag*/)
 	{ static uint16_t blink_count=0;
 		g_start_send_flag = 0;	
 	//	GetPressAndTemp();
@@ -1011,12 +1011,12 @@
 	}else{
 		gotosleep_flag=0;
 	}
-#ifndef DEBUG_MODE    
+//#ifndef DEBUG_MODE    
 	if(nomove_count>g_com_map[NOMOVESLEEP_TIME]&&imu_enable)
 	{
 		mcu_sleep();
 	}
-#endif
+//#endif
 }
 /* USER CODE END 4 */
 

--
Gitblit v1.9.3