before test
Dependencies: Communication_Robot
Fork of BEAR_Protocol_Edited by
Diff: Command.h
- Revision:
- 14:24d951efed53
- Parent:
- 11:b34eababcf56
- Child:
- 16:168de1acec53
diff -r 6296cb35f853 -r 24d951efed53 Command.h --- a/Command.h Wed Jan 27 12:53:16 2016 +0000 +++ b/Command.h Mon Mar 21 20:20:57 2016 +0000 @@ -4,26 +4,29 @@ #define WRITE_DATA 0x03 //CONTROL TABLE -#define ID 0x00 -#define MOTOR_UPPER_ANG 0x01 -#define MOTOR_LOWER_ANG 0x02 -#define UP_MARGIN 0x03 -#define LOW_MARGIN 0x04 -#define KP_UPPER_MOTOR 0x05 -#define KI_UPPER_MOTOR 0x06 -#define KD_UPPER_MOTOR 0x07 -#define KP_LOWER_MOTOR 0x08 -#define KI_LOWER_MOTOR 0x09 -#define KD_LOWER_MOTOR 0x0A -#define PID_UPPER_MOTOR 0x0B -#define PID_LOWER_MOTOR 0x0C -#define HEIGHT 0x0D -#define WHEELPOS 0x0E -#define MAG_DATA 0x0F -#define OFFSET 0x10 -#define BODY_WIDTH 0x11 -#define ANGLE_RANGE_UP 0x12 -#define ANGLE_RANGE_LOW 0x13 -#define UP_LINK_LENGTH 0x14 -#define LOW_LINK_LENGTH 0x15 -#define SAVE_EEPROM_DATA 0x16 \ No newline at end of file +#define ID 0x00 +//Constructor +#define SET_VELOCITY_LEFT 0x01 +#define SET_VELOCITY_RIGHT 0x02 +#define SET_VELOCITY_MAX_LEFT 0x03 +#define SET_VELOCITY_MAX_RIGHT 0x04 +#define SET_KP_LEFT 0x05 +#define SET_KI_LEFT 0x06 +#define SET_KD_LEFT 0x07 +#define SET_KP_RIGHT 0x08 +#define SET_KI_RIGHT 0x09 +#define SET_KD_RIGHT 0x0A +#define GET_LIDAR 0x0B +#define GET_BATTERY 0x0C +#define GET_VELOCITY_LEFT 0x0D +#define GET_VELOCITY_RIGHT 0x0E +#define GET_KP_LEFT 0x0F +#define GET_KI_LEFT 0x10 +#define GET_KD_LEFT 0x11 +#define GET_KP_RIGHT 0x12 +#define GET_KI_RIGHT 0x13 +#define GET_KD_RIGHT 0x14 + + +#define RS485_DELAY 90 +#define RS485_DIRC PA_14 \ No newline at end of file