press_down_detect.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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,
  20. // float left_front_press, float right_front_press, float left_back_press, float right_back_press);
  21. 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);
  22. int att_jump_detect(float left_pitch, float right_pitch, int left_zupt, int right_zupt);
  23. //int press_down_detect_new(int index, float front_mag_left, float back_mag_left,
  24. // float front_mag_right, float back_mag_right,int left_zupt, int right_zupt,
  25. // float left_acc_x,float left_acc_y, float left_acc_z, float right_acc_x, float right_acc_y, float right_acc_z,
  26. // int *front_down, int *back_down);
  27. int press_down_detect_new(int index, uint16_t front_mag_left, uint16_t back_mag_left,
  28. uint16_t front_mag_right, uint16_t back_mag_right, int16_t left_zupt, int16_t right_zupt,
  29. int16_t left_acc_x, int16_t left_acc_y, int16_t left_acc_z,
  30. int16_t right_acc_x, int16_t right_acc_y, int16_t right_acc_z,
  31. int16_t* front_down, int16_t* back_down);
  32. short pos_jump_detect(int *h_pos, int *s_pos, int left_zupt, int right_zupt);
  33. #endif