From 4f0725852fbce5f98a7ec016eacb63e3e8615cd6 Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期五, 13 九月 2024 14:25:08 +0800
Subject: [PATCH] 1.49

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

diff --git a/Src/main.c b/Src/main.c
index d5f19c4..1f09eab 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -226,21 +226,21 @@
         //	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;
-        save_com_map_to_flash();
-        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;
+//        save_com_map_to_flash();
+//        delay_ms(100);
+//        SCB->AIRCR = 0X05FA0000|(unsigned int)0x04; //软复位回到bootloader
+//    }
     if(g_com_map[MAP_SIGN_INDEX]!=0x55AA||g_com_map[COM_INTERVAL]==0)
     {
         SCB->AIRCR = 0X05FA0000|(unsigned int)0x04; //软复位回到bootloader
@@ -256,9 +256,9 @@
 void HardWareTypeDiffConfig(void)
 {
     GPIO_InitTypeDef GPIO_InitStruct = {0};
-//hardware_type=2;
-    if(hardware_type == 0)
-        hardware_type = 1;
+    hardware_type=g_com_map[ALARM_DISTANCE1]+1;
+//    if(hardware_type == 0)
+//        hardware_type = 1;
     switch(hardware_type)
     {
     case 1:
@@ -289,7 +289,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] = (1<<8)|44;
+    g_com_map[VERSION] = (1<<8)|49;
     active_flag = g_com_map[ACTIVE_INDEX];
     module_power = g_com_map[POWER];
     imu_enable=g_com_map[IMU_ENABLE];

--
Gitblit v1.9.3