Browse Source

添加1.2.13版本

Ouj_Junchao 2 years ago
parent
commit
423bfd8deb

BIN
dfu_readme/app_dfu_package.zip


+ 29 - 2
motion/detect_zero_vel.c

@@ -241,6 +241,8 @@ void detect_zero_vel(int16_t front[3], int16_t back[3], int16_t acc[3],
 
 	static int16_t press_wait;
 	static int16_t shake_acc_wait;
+	
+	static int16_t continue_up_min_val;
 
 
 	static int acc_zero_count;
@@ -291,6 +293,7 @@ void detect_zero_vel(int16_t front[3], int16_t back[3], int16_t acc[3],
 	
 	int16_t acc_max_val_z , acc_min_val_z ;
 	
+	//寻找加速度窗口的最大值、最小值
 	find_acc_max_and_min_val(acc_x_window, WINDOW_SIZE - SAMPLE_C * 10, WINDOW_SIZE, SAMPLE_C , &acc_max_val_x, &acc_min_val_x);
 	
 	find_acc_max_and_min_val(acc_y_window, WINDOW_SIZE - SAMPLE_C * 10, WINDOW_SIZE, SAMPLE_C, &acc_max_val_y, &acc_min_val_y);
@@ -312,6 +315,7 @@ void detect_zero_vel(int16_t front[3], int16_t back[3], int16_t acc[3],
 	//当还处于后脚压力上升的余热中,降低前脚的判断阈值
 	int front_up_trend;
 
+	//当back_up_wait 后脚跟压力上升的等待时间 大于0时候, 阈值调低为2000,否则为3000
 	if (back_up_wait > 0)
 	{
 		front_up_trend  = isLongTimeUpTrend(front_mag_window, WINDOW_SIZE, MAG_THRESHHOLD, &front_min_val);
@@ -320,24 +324,47 @@ void detect_zero_vel(int16_t front[3], int16_t back[3], int16_t acc[3],
 	{
 		front_up_trend = isLongTimeUpTrend(front_mag_window, WINDOW_SIZE, 3000, &front_min_val);
 	}
+	
+	//缓慢踩地
+	if(front_mag_window[WINDOW_SIZE - 1] - front_mag_window[WINDOW_SIZE - 1 - SAMPLE_C] >-200)
+	{
+		if(continue_up_min_val > front_mag_window[WINDOW_SIZE - 1])
+		{
+			continue_up_min_val = front_mag_window[WINDOW_SIZE - 1];
+		}
+	}
+	else
+	{
+		continue_up_min_val = front_mag_window[WINDOW_SIZE - 1];
+	}
+	
+	if(front_mag_window[WINDOW_SIZE - 1] - continue_up_min_val > 2000)
+	{
+		front_up_trend = 1;
+	}
 
+	//front_down_trend 为 1时候, 意味着前脚掌压力下降
 	int front_down_trend = isLongTimeDownTrend(front_mag_window, WINDOW_SIZE, MAG_THRESHHOLD, &front_max_val);
 
+	// 自定义前后脚压力均上升,则重置压力等待时间,press_up_wait用于判断产生剧烈抖动时,则为触地
+	// special_press_up_wait 用于判断延续触地逻辑,使其阈值变大(解决触地剧烈抖动的情况)
 	if ((back_mag_window[WINDOW_SIZE - 1] - back_min_val > 2000 && back_max_val - back_mag_window[WINDOW_SIZE - 1] < 1000) ||
-		(front_mag_window[WINDOW_SIZE - 1] - front_min_val > 2000 && front_max_val - front_mag_window[WINDOW_SIZE - 1] < 1000))
+		(front_mag_window[WINDOW_SIZE - 1] - front_min_val > 2000 && front_max_val - front_mag_window[WINDOW_SIZE - 1] < 1000) ||
+		(front_mag_window[WINDOW_SIZE - 1] - continue_up_min_val > 2000))
 	{
 		press_up_wait = 20 * SAMPLE_C;
 		
 		special_press_up_wait = 20 * SAMPLE_C;
 	}
 	
+	//发现前脚压力向下降的时候,置special_press_up_wait为0,避免离地时候,该倒计时还要生效
 	if(front_down_trend  == 1)
 	{
 		special_press_up_wait = 0;
 	}
 	
 	
-
+	//当前脚掌压力上升,后脚压力上升,则意味全脚掌着地,那就意味是真正的触地
 	if (back_mag_window[WINDOW_SIZE - 1] - back_min_val > 2000 && front_mag_window[WINDOW_SIZE - 1] - front_min_val > 2000)
 	{
 		front_up_trend = 1;

File diff suppressed because it is too large
+ 0 - 0
pca10040/s132/arm5_no_packs/_build/ble_app_uart_c_pca10040_s132_Shoes_FW_APP.dep


BIN
pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.axf


+ 3 - 3
pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.build_log.htm

@@ -21,8 +21,8 @@ Target DLL:      Segger\JL2CM3.dll V2.99.38.0
 Dialog DLL:      TCM.DLL V1.42.0.0
  
 <h2>Project:</h2>
-D:\Git_Project\shoes\smart_shoes\nRF5_SDK_17.0.0_9d13099\examples\long\shoe_mcu\pca10040\s132\arm5_no_packs\ble_app_uart_c_pca10040_s132.uvprojx
-Project File Date:  06/16/2022
+D:\Git_Project\shoes\smart_shoes\nRF5_SDK_17.0.0_9d13099\examples\Shoes1.2\shoe_mcu\pca10040\s132\arm5_no_packs\ble_app_uart_c_pca10040_s132.uvprojx
+Project File Date:  07/05/2022
 
 <h2>Output:</h2>
 *** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
@@ -54,10 +54,10 @@ Package Vendor: NordicSemiconductor
    * Component: ARM::CMSIS:CORE:5.3.0
 
    * Component: NordicSemiconductor::Device:Startup:8.32.1
-      Source file:   Device\Source\system_nrf52.c
       Include file:  Device\Include\system_nrf52.h
       Source file:   Device\Source\arm\arm_startup_nrf52.s
       Include file:  Device\Include\system_nrf.h
+      Source file:   Device\Source\system_nrf52.c
 Build Time Elapsed:  00:00:01
 </pre>
 </body>

File diff suppressed because it is too large
+ 249 - 249
pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.hex


+ 2 - 2
pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.htm

@@ -3,7 +3,7 @@
 <title>Static Call Graph - [.\_build\nrf52832_xxaa.axf]</title></head>
 <body><HR>
 <H1>Static Call Graph for image .\_build\nrf52832_xxaa.axf</H1><HR>
-<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Mon Jul 04 18:00:06 2022
+<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060750: Last Updated: Tue Jul 05 10:12:11 2022
 <BR><P>
 <H3>Maximum Stack Usage =       5152 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
 Call chain for Maximum Stack Depth:</H3>
@@ -4092,7 +4092,7 @@ Global Symbols
 <BR>[Called By]<UL><LI><a href="#[7d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;app_math_DailyStep_Process
 </UL>
 
-<P><STRONG><a name="[347]"></a>detect_zero_vel</STRONG> (Thumb, 1160 bytes, Stack size 80 bytes, detect_zero_vel.o(i.detect_zero_vel))
+<P><STRONG><a name="[347]"></a>detect_zero_vel</STRONG> (Thumb, 1274 bytes, Stack size 80 bytes, detect_zero_vel.o(i.detect_zero_vel))
 <BR><BR>[Stack]<UL><LI>Max Depth = 112<LI>Call Chain = detect_zero_vel &rArr; isLongTimeDownTrend
 </UL>
 <BR>[Calls]<UL><LI><a href="#[34c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;var_acc_f

File diff suppressed because it is too large
+ 6 - 7
pca10040/s132/arm5_no_packs/ble_app_uart_c_pca10040_s132.uvguix.Administrator


+ 1 - 1
system/usr_config.h

@@ -5,7 +5,7 @@
 #define SHOES_NAME "SMART SHOE"
 #define SHOES_NAME_LEN  64
 #define HARDWARE_VERSION	0x00010201
-#define SOFTWARE_VERSION	0x000C
+#define SOFTWARE_VERSION	0x000D
 
 // <h> ¹«¹²
 

+ 1 - 3
版本更新记录.txt

@@ -1,3 +1 @@
-1.  取消打印
-2.  优化算法的时间搓
-3.  优化qma7891的驱动,开启电源之后,拉高CS引脚
+1.  优化算法

Some files were not shown because too many files changed in this diff