From f313a9ae0ed73b1343280de648b8a19e2d36983c Mon Sep 17 00:00:00 2001
From: WXK <287788329@qq.com>
Date: 星期一, 24 二月 2025 10:00:56 +0800
Subject: [PATCH] 3.5,加入加速度计10s开机后重新初始化,发生硬件错误直接重启

---
 APL/App.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/APL/App.c b/APL/App.c
index e30e1d9..c4dcb78 100644
--- a/APL/App.c
+++ b/APL/App.c
@@ -195,7 +195,7 @@
     //deca_sleep(1000);
 
     g_com_map[GROUP_ID]=3;
-	g_com_map[VERSION] = (3<<8)|3;
+	g_com_map[VERSION] = (3<<8)|5;
 
     if (g_com_map[COM_INTERVAL] <50)
     {
@@ -498,6 +498,12 @@
             }
         }
     }
+    if(bat_percent<=1)
+    {
+            HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
+            HAL_GPIO_WritePin(GPIOB, GPIO_PIN_10, GPIO_PIN_RESET);
+            HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
+    }
 }
 
 extern uint32_t main_time;

--
Gitblit v1.9.3