From 494c8d051e0981f6d098c4e6db62c0d2a230d641 Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期五, 11 七月 2025 18:50:47 +0800
Subject: [PATCH] 2.86,加入不休眠有5v输入时候

---
 Src/main.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Src/main.c b/Src/main.c
index ae08c92..99b79c2 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -188,7 +188,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)
 		{
 			state5v=1;
@@ -257,7 +257,7 @@
 
 
 
-void ErrorConfig_Handler(void)
+void CommapErrorCheck(void)
 {
 		if(g_com_map[COM_INTERVAL]==0||g_com_map[COM_INTERVAL]>1000)
 	{
@@ -288,7 +288,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)|76;
+	g_com_map[VERSION] = (2<<8)|86;
     
 //	g_com_map[DEV_ID]=0x7;
 #ifdef DEBUG_MODE
@@ -304,6 +304,7 @@
 //g_com_map[NOMOVESLEEP_TIME]=10;
 //	g_com_map[IMU_ENABLE]=0;
 //	 g_com_map[COM_INTERVAL]=50;
+    CommapErrorCheck();
 	active_flag = g_com_map[ACTIVE_INDEX];
 
 //g_com_map[HEIGHTOFFEST_INDEX]=g_com_map[MAX_REPORT_ANC_NUM];

--
Gitblit v1.9.3