⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.h

📁 关于机器人路径规划的算法实现
💻 H
字号:
#define PLAYER_WHEELCHAIR_SOUND_HORN_REQ      ((uint8_t)1)#define PLAYER_WHEELCHAIR_SET_MODE_REQ        ((uint8_t)2)#define PLAYER_WHEELCHAIR_INC_GEAR_REQ        ((uint8_t)3)#define PLAYER_WHEELCHAIR_DEC_GEAR_REQ        ((uint8_t)4)#define PLAYER_WHEELCHAIR_SET_POWER_REQ       ((uint8_t)5)#define PLAYER_WHEELCHAIR_GET_MODE_REQ        ((uint8_t)6)#define PLAYER_WHEELCHAIR_GET_JOYX_REQ        ((uint8_t)7)#define PLAYER_WHEELCHAIR_GET_JOYY_REQ        ((uint8_t)8)#define PLAYER_WHEELCHAIR_GET_POWER_REQ       ((uint8_t)9)/*  Host to network and Network to Host Castings    */#define HTOPS(x)  htonl(static_cast<int16_t>(rint(x)))#define HTOPL(x)  htonl(static_cast<int32_t>(rint(x))) #define PTOHL(x)  ntohl(static_cast<int32_t>(rint(x))) #define PTOHS(x)  ntohl(static_cast<int16_t>(rint(x))) #define ON 1#define OFF 0#define HORN_SLEEP 150000#define UP 1 #define DOWN 0#define AUTO 1  #define MANUAL 0#define INCREMENT 1  #define DECREMENT 0/******************* DATA STARTS******************************/typedef struct player_wheelchair_data{ int32_t joyx, joyy;          // X and Y position of the joystick int16_t mode, power;        // mode, Auto or Manual; power, On or Off} __attribute__ ((packed)) player_wheelchair_data_t;/******************* DATA ENDS*******************************//******************* COMMAND STARTS************************/typedef struct player_wheelchair_speed_cmd{   int32_t xpos, ypos;            // X and Y position    int32_t xspeed,yspeed;         // Linear And Angular Velocity in m/sec and rad /sec   int32_t yaw,yawspeed;          // angle and angular velocity in m/sec   int32_t state,type;            // state (ON,OFF) and type of command (Position Control or Speed Control)} __attribute__ ((packed)) player_wheelchair_speed_cmd_t;/******************* COMMAND ENDS************************//*******************CONFIG   STARTS************************/typedef struct player_wheelchair_config{  uint8_t request;  uint16_t value;} __attribute__ ((packed)) player_wheelchair_config_t;/*******************CONFIG      ENDS************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -