Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef RFLEX_INFO_H
00027 #define RFLEX_INFO_H
00028
00029
00030 static const int PROTOCOL_SIZE = 9;
00031 static const int PACKET_CRC_START = 2;
00032 static const int PACKET_CRC_OFFSET = 4;
00033
00034 static const int PACKET_PORT_BYTE = 2;
00035 static const int PACKET_ID_BYTE = 3;
00036 static const int PACKET_OPCODE_BYTE = 4;
00037 static const int PACKET_SIZE_BYTE = 5;
00038 static const int PACKET_DATA_START_BYTE = 6;
00039
00040 #define MAX_COMMAND_LENGTH 256
00041 #define BUFFER_SIZE 1024
00042
00043 #define STD_TRANS_TORQUE 30000
00044 #define STD_ROT_ACC 100000
00045 #define STD_ROT_TORQUE 35000
00046
00047 #define SYS_PORT 1
00048 #define MOT_PORT 2
00049 #define JSTK_PORT 3
00050 #define SONAR_PORT 4
00051 #define DIO_PORT 5
00052 #define IR_PORT 6
00053
00054 #define SYS_LCD_DUMP 0
00055 #define SYS_STATUS 1
00056
00057 #define MOT_AXIS_GET_SYSTEM 0
00058 #define MOT_AXIS_GET_MODEL 1
00059 #define MOT_AXIS_GET_TARGET 2
00060 #define MOT_AXIS_SET_LIMITS 3
00061 #define MOT_AXIS_GET_LIMITS 4
00062 #define MOT_AXIS_SET_POS_LIMITS 5
00063 #define MOT_AXIS_GET_POS_LIMITS 6
00064 #define MOT_AXIS_SET_DIR 7
00065 #define MOT_AXIS_SET_POS 8
00066 #define MOT_AXIS_GET_MODE 9
00067 #define MOT_SET_DEFAULTS 10
00068 #define MOT_BRAKE_SET 11
00069 #define MOT_BRAKE_RELEASE 12
00070 #define MOT_SYSTEM_REPORT 33
00071 #define MOT_SYSTEM_REPORT_REQ 34
00072 #define MOT_GET_NAXES 65
00073 #define MOT_SET_GEARING 66
00074 #define MOT_GET_GEARING 67
00075 #define MOT_MOTOR_SET_MODE 68
00076 #define MOT_MOTOR_GET_MODE 69
00077 #define MOT_MOTOR_SET_PARMS 70
00078 #define MOT_MOTOR_GET_PARMS 71
00079 #define MOT_MOTOR_SET_LIMITS 72
00080 #define MOT_MOTOR_GET_LIMITS 73
00081 #define MOT_MOTOR_GET_DATA 74
00082 #define MOT_AXIS_SET_PARMS 75
00083 #define MOT_AXIS_GET_PARMS 76
00084 #define MOT_AXIS_SET_PWM_LIMIT 77
00085 #define MOT_AXIS_GET_PWM_LIMIT 78
00086 #define MOT_AXIS_SET_PWM 79
00087 #define MOT_AXIS_GET_PWM 80
00088
00089 #define SONAR_RUN 0
00090 #define SONAR_GET_UPDATE 1
00091 #define SONAR_REPORT 2
00092
00093 #define DIO_REPORTS_REQ 0
00094 #define DIO_REPORT 1
00095 #define DIO_GET_UPDATE 2
00096 #define DIO_UPDATE 3
00097 #define DIO_SET 4
00098
00099 #define IR_RUN 0
00100 #define IR_REPORT 1
00101
00102 #define JSTK_GET_STATE 0
00103
00104 #define HEADING_HOME_ADDRESS 0x31
00105 #define BUMPER_ADDRESS 0x40
00106
00107 #define SONAR_MAX_COUNT 224
00108
00109
00110 static const unsigned char NUL = 0;
00111 static const unsigned char SOH = 1;
00112 static const unsigned char STX = 2;
00113 static const unsigned char ETX = 3;
00114 static const unsigned char ESC = 27;
00115
00116 #endif