43 #define RPLIDAR_CMD_STOP 0x25 44 #define RPLIDAR_CMD_SCAN 0x20 45 #define RPLIDAR_CMD_FORCE_SCAN 0x21 46 #define RPLIDAR_CMD_RESET 0x40 50 #define RPLIDAR_CMD_GET_DEVICE_INFO 0x50 51 #define RPLIDAR_CMD_GET_DEVICE_HEALTH 0x52 53 #define RPLIDAR_CMD_GET_SAMPLERATE 0x59 //added in fw 1.17 55 #define RPLIDAR_CMD_HQ_MOTOR_SPEED_CTRL 0xA8 58 #define RPLIDAR_CMD_EXPRESS_SCAN 0x82 //added in fw 1.17 59 #define RPLIDAR_CMD_HQ_SCAN 0x83 //added in fw 1.24 60 #define RPLIDAR_CMD_GET_LIDAR_CONF 0x84 //added in fw 1.24 61 #define RPLIDAR_CMD_SET_LIDAR_CONF 0x85 //added in fw 1.24 63 #define RPLIDAR_CMD_SET_MOTOR_PWM 0xF0 64 #define RPLIDAR_CMD_GET_ACC_BOARD_FLAG 0xFF 73 #define RPLIDAR_EXPRESS_SCAN_MODE_NORMAL 0 74 #define RPLIDAR_EXPRESS_SCAN_MODE_FIXANGLE 0 // won't been supported but keep to prevent build fail 76 #define RPLIDAR_EXPRESS_SCAN_FLAG_BOOST 0x0001 77 #define RPLIDAR_EXPRESS_SCAN_FLAG_SUNLIGHT_REJECTION 0x0002 80 #define RPLIDAR_ULTRAEXPRESS_SCAN_FLAG_STD 0x0001 81 #define RPLIDAR_ULTRAEXPRESS_SCAN_FLAG_HIGH_SENSITIVITY 0x0002 83 #define RPLIDAR_HQ_SCAN_FLAG_CCW (0x1<<0) 84 #define RPLIDAR_HQ_SCAN_FLAG_RAW_ENCODER (0x1<<1) 85 #define RPLIDAR_HQ_SCAN_FLAG_RAW_DISTANCE (0x1<<2) 102 #define MAX_MOTOR_PWM 1023 103 #define DEFAULT_MOTOR_PWM 660 118 #define RPLIDAR_ANS_TYPE_DEVINFO 0x4 119 #define RPLIDAR_ANS_TYPE_DEVHEALTH 0x6 121 #define RPLIDAR_ANS_TYPE_MEASUREMENT 0x81 123 #define RPLIDAR_ANS_TYPE_MEASUREMENT_CAPSULED 0x82 124 #define RPLIDAR_ANS_TYPE_MEASUREMENT_HQ 0x83 128 #define RPLIDAR_ANS_TYPE_SAMPLE_RATE 0x15 130 #define RPLIDAR_ANS_TYPE_MEASUREMENT_CAPSULED_ULTRA 0x84 132 #define RPLIDAR_ANS_TYPE_GET_LIDAR_CONF 0x20 133 #define RPLIDAR_ANS_TYPE_SET_LIDAR_CONF 0x21 134 #define RPLIDAR_ANS_TYPE_MEASUREMENT_DENSE_CAPSULED 0x85 135 #define RPLIDAR_ANS_TYPE_ACC_BOARD_FLAG 0xFF 137 #define RPLIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK (0x1) 143 #define RPLIDAR_STATUS_OK 0x0 144 #define RPLIDAR_STATUS_WARNING 0x1 145 #define RPLIDAR_STATUS_ERROR 0x2 147 #define RPLIDAR_RESP_MEASUREMENT_SYNCBIT (0x1<<0) 148 #define RPLIDAR_RESP_MEASUREMENT_QUALITY_SHIFT 2 150 #define RPLIDAR_RESP_HQ_FLAG_SYNCBIT (0x1<<0) 152 #define RPLIDAR_RESP_MEASUREMENT_CHECKBIT (0x1<<0) 153 #define RPLIDAR_RESP_MEASUREMENT_ANGLE_SHIFT 1 164 }
__attribute__((packed)) rplidar_response_measurement_node_t;
167 #define RPLIDAR_RESP_MEASUREMENT_EXP_ANGLE_MASK (0x3) 168 #define RPLIDAR_RESP_MEASUREMENT_EXP_DISTANCE_MASK (0xFC) 177 #define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_1 0xA 178 #define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_2 0x5 180 #define RPLIDAR_RESP_MEASUREMENT_HQ_SYNC 0xA5 182 #define RPLIDAR_RESP_MEASUREMENT_EXP_SYNCBIT (0x1<<15) 188 rplidar_response_cabin_nodes_t
cabins[16];
189 }
__attribute__((packed)) rplidar_response_capsule_measurement_nodes_t;
193 }
__attribute__((packed)) rplidar_response_dense_cabin_nodes_t;
199 rplidar_response_dense_cabin_nodes_t
cabins[40];
200 }
__attribute__((packed)) rplidar_response_dense_capsule_measurement_nodes_t;
204 #define RPLIDAR_RESP_MEASUREMENT_EXP_ULTRA_MAJOR_BITS 12 205 #define RPLIDAR_RESP_MEASUREMENT_EXP_ULTRA_PREDICT_BITS 10 211 }
__attribute__((packed)) rplidar_response_ultra_cabin_nodes_t;
218 }
__attribute__((packed)) rplidar_response_ultra_capsule_measurement_nodes_t;
230 rplidar_response_measurement_node_hq_t
node_hq[16];
232 }
__attribute__((packed)) rplidar_response_hq_capsule_measurement_nodes_t;
235 # define RPLIDAR_CONF_SCAN_COMMAND_STD 0 236 # define RPLIDAR_CONF_SCAN_COMMAND_EXPRESS 1 237 # define RPLIDAR_CONF_SCAN_COMMAND_HQ 2 238 # define RPLIDAR_CONF_SCAN_COMMAND_BOOST 3 239 # define RPLIDAR_CONF_SCAN_COMMAND_STABILITY 4 240 # define RPLIDAR_CONF_SCAN_COMMAND_SENSITIVITY 5 242 #define RPLIDAR_CONF_ANGLE_RANGE 0x00000000 243 #define RPLIDAR_CONF_DESIRED_ROT_FREQ 0x00000001 244 #define RPLIDAR_CONF_SCAN_COMMAND_BITMAP 0x00000002 245 #define RPLIDAR_CONF_MIN_ROT_FREQ 0x00000004 246 #define RPLIDAR_CONF_MAX_ROT_FREQ 0x00000005 247 #define RPLIDAR_CONF_MAX_DISTANCE 0x00000060 249 #define RPLIDAR_CONF_SCAN_MODE_COUNT 0x00000070 250 #define RPLIDAR_CONF_SCAN_MODE_US_PER_SAMPLE 0x00000071 251 #define RPLIDAR_CONF_SCAN_MODE_MAX_DISTANCE 0x00000074 252 #define RPLIDAR_CONF_SCAN_MODE_ANS_TYPE 0x00000075 253 #define RPLIDAR_CONF_SCAN_MODE_TYPICAL 0x0000007C 254 #define RPLIDAR_CONF_SCAN_MODE_NAME 0x0000007F 255 #define RPLIDAR_EXPRESS_SCAN_STABILITY_BITMAP 4 256 #define RPLIDAR_EXPRESS_SCAN_SENSITIVITY_BITMAP 5 281 #define RPLIDAR_VARBITSCALE_X2_SRC_BIT 9 282 #define RPLIDAR_VARBITSCALE_X4_SRC_BIT 11 283 #define RPLIDAR_VARBITSCALE_X8_SRC_BIT 12 284 #define RPLIDAR_VARBITSCALE_X16_SRC_BIT 14 286 #define RPLIDAR_VARBITSCALE_X2_DEST_VAL 512 287 #define RPLIDAR_VARBITSCALE_X4_DEST_VAL 1280 288 #define RPLIDAR_VARBITSCALE_X8_DEST_VAL 1792 289 #define RPLIDAR_VARBITSCALE_X16_DEST_VAL 3328 291 #define RPLIDAR_VARBITSCALE_GET_SRC_MAX_VAL_BY_BITS(_BITS_) \ 292 ( (((0x1<<(_BITS_)) - RPLIDAR_VARBITSCALE_X16_DEST_VAL)<<4) + \ 293 ((RPLIDAR_VARBITSCALE_X16_DEST_VAL - RPLIDAR_VARBITSCALE_X8_DEST_VAL)<<3) + \ 294 ((RPLIDAR_VARBITSCALE_X8_DEST_VAL - RPLIDAR_VARBITSCALE_X4_DEST_VAL)<<2) + \ 295 ((RPLIDAR_VARBITSCALE_X4_DEST_VAL - RPLIDAR_VARBITSCALE_X2_DEST_VAL)<<1) + \ 296 RPLIDAR_VARBITSCALE_X2_DEST_VAL - 1)
rplidar_response_measurement_node_hq_t node_hq[16]
rplidar_response_ultra_cabin_nodes_t ultra_cabins[32]
struct _rplidar_payload_express_scan_t __attribute__((packed)) rplidar_payload_express_scan_t
_u16 std_sample_duration_us
rplidar_response_cabin_nodes_t cabins[16]
_u16 express_sample_duration_us