|
@@ -235,12 +235,12 @@ void app_BatDispaly_Process(void)
|
|
|
bll_imu_get_data(BLL_IMU_DIR_FRONT, data_size-1 , &data);
|
|
|
|
|
|
//耗时较少的计算滑动窗口的最大值、最小值
|
|
|
- sort_silde_window(&max_slide_window, &min_slide_window, data.acc[0], time_count);
|
|
|
+ sort_silde_window(&max_slide_window, &min_slide_window, data.acc[2], time_count);
|
|
|
|
|
|
|
|
|
if(time_count > SLIDE_WINDOW_LEN)
|
|
|
{
|
|
|
- if(data.acc[0] - min_slide_window.slide_window[0].max_temp < 256 && max_slide_window.slide_window[0].max_temp - data.acc[0] < 256
|
|
|
+ if(data.acc[2] - min_slide_window.slide_window[0].max_temp < 256 && max_slide_window.slide_window[0].max_temp - data.acc[2] < 256
|
|
|
&& max_slide_window.slide_window[0].max_temp - min_slide_window.slide_window[0].max_temp < 256 && data.acc[0] < -600)
|
|
|
{
|
|
|
station_count++;
|