1234567891011121314151617181920212223242526272829303132333435363738 |
- #include <deque>
- using namespace std;
- //由于在鞋子里,判断蹲,并不完美,需要在SDK进行补充
- //后期考虑将蹲放置SDK上判断
- class online_motion
- {
- public:
- int online_detect_down(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag,
- int* right_acc, int* left_acc);
- int online_detect_touch_floor(int right_front_mag, int left_front_mag, int right_back_mag, int left_back_mag );
- void push_press_queue(deque<int>& press_queue ,int press, int queue_size);
- int check_press_queue_up(deque<int>& press_queue, int thresh_hold);
- private:
- deque<int> right_back_mag_queue;
- deque<int> left_back_mag_queue;
- deque<int> right_front_mag_queue;
- deque<int> left_front_mag_queue;
- deque<int> left_front_acc;
- deque<int> right_front_acc;
- int last_back_down = 0;
- int last_front_down = 0;
- int last_little_front_down = 0;
- deque<int> left_front_press_queue_touch_floor;
- deque<int> left_back_press_queue_touch_floor;
- deque<int> right_front_press_queue_touch_floor;
- deque<int> right_back_press_queue_touch_floor;
- };
|