1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "pub.h"
- #define STOP_ANGLE -0.65f
- class SingleFootAction {
- public:
- SingleFootAction(int foot_type) : can_report_motion(0), pause_signal(0), enter_signal(0),
- direction_signal(-1), last_zupt(1), left_or_right(foot_type), interation_state(-1),
- last_x(0), last_y(0), last_z(0)
- {};
- void report_siganl_listen(int z);
- void pause_signal_listen(float pitch);
- void direction_signal_listen(int x, int y, int zupt, int rssi);
- void set_motion_signal(int zupt);
- int get_interation_state();
- void run(int x, int y, int z, int zupt, int rssi, float pitch);
- private:
- int pause_signal_count;
- int can_report_motion;
- int pause_signal;
- int enter_signal;
- int direction_signal;
- int last_zupt;
- int left_or_right;
- int interation_state;
- int last_x;
-
- int last_y;
- int last_z;
- };
|