From 0d1f703f0e55af724fdcc564c418778656084d12 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期五, 10 六月 2022 09:59:48 +0800
Subject: [PATCH] V1.28 未激活充电不亮绿灯bug

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

diff --git a/Src/main.c b/Src/main.c
index b5ef414..8890ac6 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -188,6 +188,7 @@
 	if(HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin))
 	{
 		nomove_count = 0;
+        bat_percent=Get_Battary();
 		if(state5v==0)
 		{
 			state5v=1;
@@ -306,7 +307,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] = 0x011b;
+	g_com_map[VERSION] = (1<<8)|28;
     active_flag = g_com_map[ACTIVE_INDEX];
     	module_power = g_com_map[POWER];
 	imu_enable=g_com_map[IMU_ENABLE];
@@ -461,8 +462,7 @@
 //		HAL_GPIO_WritePin(LED0_GPIO, GPIO_PIN_9, GPIO_PIN_RESET);
 //		}
 //		LED_TR_BLINK;s
-		
-			bat_percent=Get_Battary();
+		bat_percent=Get_Battary();
 		if(bat_percent>15)
 		{	LED_TB_ON;
 			Tag_App();

--
Gitblit v1.9.3