SingleFootAction.h 799 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #include "pub.h"
  2. #define STOP_ANGLE -0.65f
  3. class SingleFootAction {
  4. public:
  5. SingleFootAction(int foot_type) : can_report_motion(0), pause_signal(0), enter_signal(0),
  6. direction_signal(-1), last_zupt(1), left_or_right(foot_type), interation_state(-1),
  7. last_x(0), last_y(0), last_z(0)
  8. {};
  9. void report_siganl_listen(int z);
  10. void pause_signal_listen(float pitch);
  11. void direction_signal_listen(int x, int y, int zupt, int rssi);
  12. void set_motion_signal(int zupt);
  13. int get_interation_state();
  14. void run(int x, int y, int z, int zupt, int rssi, float pitch);
  15. private:
  16. int pause_signal_count;
  17. int can_report_motion;
  18. int pause_signal;
  19. int enter_signal;
  20. int direction_signal;
  21. int last_zupt;
  22. int left_or_right;
  23. int interation_state;
  24. int last_x;
  25. int last_y;
  26. int last_z;
  27. };