online_motion.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include <deque>
  2. using namespace std;
  3. //由于在鞋子里,判断蹲,并不完美,需要在SDK进行补充
  4. //后期考虑将蹲放置SDK上判断
  5. class online_motion
  6. {
  7. public:
  8. int online_detect_down(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag,
  9. int* right_acc, int* left_acc);
  10. int online_detect_touch_floor(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag );
  11. void push_press_queue(deque<int>& press_queue ,int press, int queue_size);
  12. int check_press_queue_up(deque<int>& press_queue, int thresh_hold);
  13. private:
  14. deque<int> right_back_mag_queue;
  15. deque<int> left_back_mag_queue;
  16. deque<int> right_front_mag_queue;
  17. deque<int> left_front_mag_queue;
  18. deque<int> left_front_acc;
  19. deque<int> right_front_acc;
  20. int last_back_down = 0;
  21. int last_front_down = 0;
  22. int last_little_front_down = 0;
  23. deque<int> left_front_press_queue_touch_floor;
  24. deque<int> left_back_press_queue_touch_floor;
  25. deque<int> right_front_press_queue_touch_floor;
  26. deque<int> right_back_press_queue_touch_floor;
  27. };