press_down_detect.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef __press_down_detect_h__
  2. #define __press_down_detect_h__
  3. #include "main.h"
  4. extern void gpio_mt_run(uint32_t tim);
  5. #define PRESS_LEGTH 15
  6. #define DETECT_DOWN_SIZE 2
  7. #define PRESS_COUNT_MAX 5
  8. #define TIME_INTERVAL 10
  9. #if GIRL_SHOES == 1
  10. #define PRESS_INTER 150000
  11. #else
  12. #define PRESS_INTER 250000
  13. #endif
  14. //#define LEFT_PRESS_LOW 10400000
  15. //#define RIGHT_PRESS_LOW 10050000
  16. #define LEFT_PRESS_LOW 9860000
  17. #define RIGHT_PRESS_LOW 10570000
  18. //short press_jump_detect(int16_t *h_pos, int16_t *s_pos);
  19. short press_jump_detect(float left_acc_z, float right_acc_z, int left_zupt, int right_zupt, int left_front_press, int right_front_press, int left_back_press, int right_back_press);
  20. int press_down_detect_new(int index, float front_mag_left, float back_mag_left,
  21. float front_mag_right, float back_mag_right,int left_zupt, int right_zupt,
  22. float left_acc_x,float left_acc_y, float left_acc_z, float right_acc_x, float right_acc_y, float right_acc_z,
  23. int *front_down, int *back_down);
  24. #endif