From 8aa49449ae60d1232c9d029e5b8b0ada2ae6346c Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期三, 22 三月 2023 16:45:54 +0800
Subject: [PATCH] 增加防撞标签逻辑

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

diff --git a/Src/main.c b/Src/main.c
index 99cf2eb..15fd521 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -208,31 +208,7 @@
 		LED_LG_OFF;
 //	}
 }
-	if(g_com_map[CNT_UPDATE]==1)
-	{
-	uint32_t result = 0;
-		uint16_t tmp = 0xAAAA;
-	__disable_irq();
-	result = FLASH_Prepare(0x8004A38, 128);
-	if(result)
-		result = FLASH_Write(0x8004A38, (const uint8_t*)&tmp, 2); 
-	__enable_irq();
-		printf("进入升级模式\r\n");
-	g_com_map[CNT_UPDATE]=0;
-	save_com_map_to_flash();
-	delay_ms(100);
-		//	STMFLASH_Write_NoCheck(0x8004A38,0xAAAA);
-		//	Delay_ms(100);
-			SCB->AIRCR = 0X05FA0000|(unsigned int)0x04; //软复位回到bootloader   
-	}
-			if(g_com_map[CNT_REBOOT]==1)
-		{
-			g_com_map[CNT_REBOOT]=0;
-			g_com_map[MAP_SIGN_INDEX]=0;
-			save_com_map_to_flash();
-			delay_ms(100);
-			SCB->AIRCR = 0X05FA0000|(unsigned int)0x04; //软复位回到bootloader   
-		}
+
 		if(g_com_map[CNT_RESTART]==1)
 		{
 			g_com_map[CNT_RESTART]=0;
@@ -281,7 +257,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)|61;
+	g_com_map[VERSION] = (2<<8)|62;
     
 //	g_com_map[DEV_ID]=0x7;
 #ifdef DEBUG_MODE
@@ -357,7 +333,7 @@
 	{
 			g_com_map[MOTORBEEPER_INDEX] = 2;
 	}
-	hardware_type	= g_com_map[MOTORBEEPER_INDEX];
+	hardware_type	= 1;//g_com_map[MOTORBEEPER_INDEX];;
 	switch(hardware_type)
 		{
         case 1:	  

--
Gitblit v1.9.3