press_down_detect.h 916 B

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 20
  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(short*, short*);
  19. short press_jump_detect(float left_acc_z, float right_acc_z);
  20. int press_down_detect_new(int index, uint16_t left_press, uint16_t right_press, float left_acc_z, float right_acc_z,
  21. float pitch_left, float pitch_right, uint8_t _rssi);
  22. int press_down_detect_press(int index, float front_mag_left, float back_mag_left,
  23. float front_mag_right, float back_mag_right, int *front_down, int *back_down);
  24. #endif