123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- #pragma once
- #ifndef _pub_h__
- #define _pub_h__
- #include <iostream>
- #include <math.h>
- #include <stdlib.h>
- #include <vector>
- #include <string>
- using namespace std;
- #define LEFT_FOOT 1
- #define RIGHT_FOOT 2
- //#define DANCING_THRESH 5
- #define DANCING_THRESH 0
- #define CIRCLE_CENTER 22
- #define ORIGINTRAJ 0
- #define RUNGAME 1
- #define DANCEGAME 2
- #define H5GAME 3
- #define MONSTER 4
- #define RUINS 5
- #define CYCLE 6
- #define BIGFOOT 7
- #define FINGERGUESSING 8
- #define AEROBICS 9
- #define KONGFU 10
- #define TESTGAME 100
- #define RSSI_LIMIT
- #define PI 3.141592653
- #define DANCEGAME_MIN_RSSI 26
- #define PRESS_MIN 41000
- #define GAME_VERSION "0.4.57"
- enum CMD_MOTION
- {
- MOTION_STOP = 0,
- MOTION_RUN, // 跑
- MOTION_JUMP, // 跳
- MOTION_DOWN, // 蹲
- MOTION_LEFT, // 滑左
- MOTION_RIGHT, // 滑右
- MOTION_FRONT, // 滑前
- MOTION_BACK, // 滑后
- MOTION_LEFT_UP, // 点击-左上
- MOTION_LEFT_DOWN, // 点击-左下
- MOTION_RIGHT_UP, // 点击-右上
- MOTION_RIGHT_DOWN, // 点击-右下
- MOTION_STEP, // 点击-原地踩
- MOTION_JUMP_OC, // 开合跳
- MOTION_JUMP_VERTICAL, // 垂直跳
- MOTION_ROCK, //石头
- MOTION_SCISSORS, //剪刀
- MOTION_PAPER, //布
- MOTION_STRETCH_LEFT, //左伸腿
- MOTION_LIFT_LEFT, //左抬腿
- MOTION_STRETCH_RIGHT, //右伸腿
- MOTION_LIFT_RIGHT, //右抬腿
- MOTION_STRETCH_FRONT_LEFT,
- MOTION_STRETCH_FRONT_RIGHT,
- MOTION_DOWN_FRONT, //踮脚蹲
- NUMBERS_OF_MOTION,
- MOTION_CANCEL = 0x0100,
- };
- enum MOTION_COUNT_TYPE {
- STEP_COUNT = 0,
- JUMP_COUNT,
-
- DOWN_COUNT,
- KICK_COUNT,
- PAPER_COUNT,
- SCISSORS_COUNT,
- ROCK_COUNT,
- };
- enum CMD_INTERATION
- {
- NONE_INTERATION = 0,
- FRONT_LEFT,//左上键
- FRONT_RIGHT,//右上键
- BACK_LEFT,//左下键
- BACK_RIGHT,//右下键
- ENTER_KEY,//确认键
- CANCLE_KEY,//取消键
- };
- struct posData
- {
- float pos_x;
- float pos_y;
- float rssi;
- };
- struct FootActionState {
- int FootState;
- int StateCount;
- uint32_t Triggering_time;
- };
- struct globalPos_struct {
- int time_stamp;
- float pos_x;
- float pos_y;
- float pos_z;
- };
- struct SHOES_DATA_STRUCT{
- int gameTime;
- int right_pos_data[3];
- int right_att_data[3];
- int right_acc_data[3];
- int right_zupt;
- int right_front_mag;
- int right_back_mag;
- int left_pos_data[3];
- int left_att_data[3];
- int left_acc_data[3];
- int left_zupt;
- int left_front_mag;
- int left_back_mag;
- int jump;
- int down;
- int rssi;
- };
- #endif
|