#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), big_pitch_count(0), can_report_enter_signal(0), last_enter_signal(0), enter_signal_cooling(0) {}; void can_listen_direction_signal(int rssi); //void pause_signal_listen(float pitch); int direction_signal_listen(int x, int y, int zupt, int rssi); //void set_motion_signal(int zupt); //��ȡ��ŵ��Լ���ͣ���ź� int enter_signal_listen(float* acc, float pitch); int can_listen_enter_signal(float* acc, float pitch); int get_interation_state(); void run(int x, int y, int z, int zupt, int rssi, float pitch, float* acc); 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; float acc_x_buff[10]; float big_pitch_count; int can_report_enter_signal; int last_enter_signal; int enter_signal_cooling; };