pub.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. #pragma once
  2. #ifndef _pub_h__
  3. #define _pub_h__
  4. #include <iostream>
  5. #include <math.h>
  6. #include <stdlib.h>
  7. #include <vector>
  8. #include <string>
  9. #include <algorithm>
  10. using namespace std;
  11. #define LEFT_FOOT 1
  12. #define RIGHT_FOOT 2
  13. //#define DANCING_THRESH 5
  14. #define DANCING_THRESH 0
  15. #define CIRCLE_CENTER 22
  16. #define ORIGINTRAJ 0
  17. #define RUNGAME 1
  18. #define DANCEGAME 2
  19. #define H5GAME 3
  20. #define MONSTER 4
  21. #define RUINS 5
  22. #define CYCLE 6
  23. #define BIGFOOT 7
  24. #define FINGERGUESSING 8
  25. #define AEROBICS 9
  26. #define KONGFU 10
  27. #define SPORT 11
  28. #define BUILDHOUSE 12
  29. #define CUTCAKE 13
  30. #define TESTGAME 100
  31. #define RSSI_LIMIT
  32. #define PI 3.141592653
  33. #define DANCEGAME_MIN_RSSI 26
  34. #define PRESS_MIN 41000
  35. #define GAME_VERSION "0.5.36"
  36. enum CMD_MOTION
  37. {
  38. MOTION_STOP = 0,
  39. MOTION_RUN, // 跑
  40. MOTION_JUMP, // 跳
  41. MOTION_DOWN, // 蹲
  42. MOTION_LEFT, // 滑左
  43. MOTION_RIGHT, // 滑右
  44. MOTION_FRONT, // 滑前
  45. MOTION_BACK, // 滑后
  46. MOTION_LEFT_UP, // 点击-左上
  47. MOTION_LEFT_DOWN, // 点击-左下
  48. MOTION_RIGHT_UP, // 点击-右上
  49. MOTION_RIGHT_DOWN, // 点击-右下
  50. MOTION_STEP, // 点击-原地踩
  51. MOTION_JUMP_OC, // 开合跳
  52. MOTION_JUMP_VERTICAL, // 垂直跳
  53. MOTION_ROCK, //石头
  54. MOTION_SCISSORS, //剪刀
  55. MOTION_PAPER, //布
  56. MOTION_STRETCH_LEFT, //左伸腿
  57. MOTION_LIFT_LEFT, //左抬腿
  58. MOTION_STRETCH_RIGHT, //右伸腿
  59. MOTION_LIFT_RIGHT, //右抬腿
  60. MOTION_STRETCH_FRONT_LEFT,
  61. MOTION_STRETCH_FRONT_RIGHT,
  62. MOTION_DOWN_FRONT, //踮脚蹲
  63. NUMBERS_OF_MOTION,
  64. MOTION_CANCEL = 0x0100,
  65. };
  66. enum MOTION_COUNT_TYPE {
  67. STEP_COUNT = 0,
  68. JUMP_COUNT,
  69. DOWN_COUNT,
  70. KICK_COUNT,
  71. PAPER_COUNT,
  72. SCISSORS_COUNT,
  73. ROCK_COUNT,
  74. };
  75. enum CMD_INTERATION
  76. {
  77. NONE_INTERATION = 0,
  78. FRONT_LEFT,//左上键
  79. FRONT_RIGHT,//右上键
  80. BACK_LEFT,//左下键
  81. BACK_RIGHT,//右下键
  82. ENTER_KEY,//确认键
  83. CANCLE_KEY,//取消键
  84. };
  85. struct posData
  86. {
  87. float pos_x;
  88. float pos_y;
  89. float rssi;
  90. };
  91. struct FootActionState {
  92. int FootState;
  93. int StateCount;
  94. uint32_t Triggering_time;
  95. };
  96. struct globalPos_struct {
  97. int time_stamp;
  98. float pos_x;
  99. float pos_y;
  100. float pos_z;
  101. };
  102. #endif