42 #define SL_LIDAR_AUTOBAUD_MAGICBYTE 0x41 45 #define SL_LIDAR_CMD_STOP 0x25 46 #define SL_LIDAR_CMD_SCAN 0x20 47 #define SL_LIDAR_CMD_FORCE_SCAN 0x21 48 #define SL_LIDAR_CMD_RESET 0x40 51 #define SL_LIDAR_CMD_NEW_BAUDRATE_CONFIRM 0x90 //added in fw 1.30 54 #define SL_LIDAR_CMD_GET_DEVICE_INFO 0x50 55 #define SL_LIDAR_CMD_GET_DEVICE_HEALTH 0x52 57 #define SL_LIDAR_CMD_GET_SAMPLERATE 0x59 //added in fw 1.17 59 #define SL_LIDAR_CMD_HQ_MOTOR_SPEED_CTRL 0xA8 63 #define SL_LIDAR_CMD_EXPRESS_SCAN 0x82 //added in fw 1.17 64 #define SL_LIDAR_CMD_HQ_SCAN 0x83 //added in fw 1.24 65 #define SL_LIDAR_CMD_GET_LIDAR_CONF 0x84 //added in fw 1.24 66 #define SL_LIDAR_CMD_SET_LIDAR_CONF 0x85 //added in fw 1.24 68 #define SL_LIDAR_CMD_SET_MOTOR_PWM 0xF0 69 #define SL_LIDAR_CMD_GET_ACC_BOARD_FLAG 0xFF 78 #define SL_LIDAR_EXPRESS_SCAN_MODE_NORMAL 0 79 #define SL_LIDAR_EXPRESS_SCAN_MODE_FIXANGLE 0 // won't been supported but keep to prevent build fail 81 #define SL_LIDAR_EXPRESS_SCAN_FLAG_BOOST 0x0001 82 #define SL_LIDAR_EXPRESS_SCAN_FLAG_SUNLIGHT_REJECTION 0x0002 85 #define SL_LIDAR_ULTRAEXPRESS_SCAN_FLAG_STD 0x0001 86 #define SL_LIDAR_ULTRAEXPRESS_SCAN_FLAG_HIGH_SENSITIVITY 0x0002 112 #define DEFAULT_MOTOR_SPEED (0xFFFFu) 133 }
__attribute__((packed)) sl_lidar_payload_new_bps_confirmation_t;
137 #define SL_LIDAR_ANS_TYPE_DEVINFO 0x4 138 #define SL_LIDAR_ANS_TYPE_DEVHEALTH 0x6 140 #define SL_LIDAR_ANS_TYPE_MEASUREMENT 0x81 142 #define SL_LIDAR_ANS_TYPE_MEASUREMENT_CAPSULED 0x82 143 #define SL_LIDAR_ANS_TYPE_MEASUREMENT_HQ 0x83 147 #define SL_LIDAR_ANS_TYPE_SAMPLE_RATE 0x15 149 #define SL_LIDAR_ANS_TYPE_MEASUREMENT_CAPSULED_ULTRA 0x84 151 #define SL_LIDAR_ANS_TYPE_GET_LIDAR_CONF 0x20 152 #define SL_LIDAR_ANS_TYPE_SET_LIDAR_CONF 0x21 153 #define SL_LIDAR_ANS_TYPE_MEASUREMENT_DENSE_CAPSULED 0x85 154 #define SL_LIDAR_ANS_TYPE_ACC_BOARD_FLAG 0xFF 156 #define SL_LIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK (0x1) 160 }
__attribute__((packed)) sl_lidar_response_acc_board_flag_t;
163 #define SL_LIDAR_STATUS_OK 0x0 164 #define SL_LIDAR_STATUS_WARNING 0x1 165 #define SL_LIDAR_STATUS_ERROR 0x2 167 #define SL_LIDAR_RESP_MEASUREMENT_SYNCBIT (0x1<<0) 168 #define SL_LIDAR_RESP_MEASUREMENT_QUALITY_SHIFT 2 170 #define SL_LIDAR_RESP_HQ_FLAG_SYNCBIT (0x1<<0) 172 #define SL_LIDAR_RESP_MEASUREMENT_CHECKBIT (0x1<<0) 173 #define SL_LIDAR_RESP_MEASUREMENT_ANGLE_SHIFT 1 186 }
__attribute__((packed)) sl_lidar_response_measurement_node_t;
189 #define SL_LIDAR_RESP_MEASUREMENT_EXP_ANGLE_MASK (0x3) 190 #define SL_LIDAR_RESP_MEASUREMENT_EXP_DISTANCE_MASK (0xFC) 200 #define SL_LIDAR_RESP_MEASUREMENT_EXP_SYNC_1 0xA 201 #define SL_LIDAR_RESP_MEASUREMENT_EXP_SYNC_2 0x5 203 #define SL_LIDAR_RESP_MEASUREMENT_HQ_SYNC 0xA5 205 #define SL_LIDAR_RESP_MEASUREMENT_EXP_SYNCBIT (0x1<<15) 212 sl_lidar_response_cabin_nodes_t
cabins[16];
213 }
__attribute__((packed)) sl_lidar_response_capsule_measurement_nodes_t;
218 }
__attribute__((packed)) sl_lidar_response_dense_cabin_nodes_t;
225 sl_lidar_response_dense_cabin_nodes_t
cabins[40];
226 }
__attribute__((packed)) sl_lidar_response_dense_capsule_measurement_nodes_t;
230 #define SL_LIDAR_RESP_MEASUREMENT_EXP_ULTRA_MAJOR_BITS 12 231 #define SL_LIDAR_RESP_MEASUREMENT_EXP_ULTRA_PREDICT_BITS 10 238 }
__attribute__((packed)) sl_lidar_response_ultra_cabin_nodes_t;
246 }
__attribute__((packed)) sl_lidar_response_ultra_capsule_measurement_nodes_t;
262 }
__attribute__((packed)) sl_lidar_response_hq_capsule_measurement_nodes_t;
265 # define SL_LIDAR_CONF_SCAN_COMMAND_STD 0 266 # define SL_LIDAR_CONF_SCAN_COMMAND_EXPRESS 1 267 # define SL_LIDAR_CONF_SCAN_COMMAND_HQ 2 268 # define SL_LIDAR_CONF_SCAN_COMMAND_BOOST 3 269 # define SL_LIDAR_CONF_SCAN_COMMAND_STABILITY 4 270 # define SL_LIDAR_CONF_SCAN_COMMAND_SENSITIVITY 5 272 #define SL_LIDAR_CONF_ANGLE_RANGE 0x00000000 273 #define SL_LIDAR_CONF_DESIRED_ROT_FREQ 0x00000001 274 #define SL_LIDAR_CONF_SCAN_COMMAND_BITMAP 0x00000002 275 #define SL_LIDAR_CONF_MIN_ROT_FREQ 0x00000004 276 #define SL_LIDAR_CONF_MAX_ROT_FREQ 0x00000005 277 #define SL_LIDAR_CONF_MAX_DISTANCE 0x00000060 279 #define SL_LIDAR_CONF_SCAN_MODE_COUNT 0x00000070 280 #define SL_LIDAR_CONF_SCAN_MODE_US_PER_SAMPLE 0x00000071 281 #define SL_LIDAR_CONF_SCAN_MODE_MAX_DISTANCE 0x00000074 282 #define SL_LIDAR_CONF_SCAN_MODE_ANS_TYPE 0x00000075 283 #define SL_LIDAR_CONF_LIDAR_MAC_ADDR 0x00000079 284 #define SL_LIDAR_CONF_SCAN_MODE_TYPICAL 0x0000007C 285 #define SL_LIDAR_CONF_SCAN_MODE_NAME 0x0000007F 286 #define SL_LIDAR_CONF_DETECTED_SERIAL_BPS 0x000000A1 288 #define SL_LIDAR_CONF_LIDAR_STATIC_IP_ADDR 0x0001CCC0 289 #define SL_LIDAR_EXPRESS_SCAN_STABILITY_BITMAP 4 290 #define SL_LIDAR_EXPRESS_SCAN_SENSITIVITY_BITMAP 5 326 }
__attribute__((packed)) sl_lidar_response_device_macaddr_info_t;
331 }
__attribute__((packed)) sl_lidar_response_desired_rot_speed_t;
334 #define SL_LIDAR_VARBITSCALE_X2_SRC_BIT 9 335 #define SL_LIDAR_VARBITSCALE_X4_SRC_BIT 11 336 #define SL_LIDAR_VARBITSCALE_X8_SRC_BIT 12 337 #define SL_LIDAR_VARBITSCALE_X16_SRC_BIT 14 339 #define SL_LIDAR_VARBITSCALE_X2_DEST_VAL 512 340 #define SL_LIDAR_VARBITSCALE_X4_DEST_VAL 1280 341 #define SL_LIDAR_VARBITSCALE_X8_DEST_VAL 1792 342 #define SL_LIDAR_VARBITSCALE_X16_DEST_VAL 3328 344 #define SL_LIDAR_VARBITSCALE_GET_SRC_MAX_VAL_BY_BITS(_BITS_) \ 345 ( (((0x1<<(_BITS_)) - SL_LIDAR_VARBITSCALE_X16_DEST_VAL)<<4) + \ 346 ((SL_LIDAR_VARBITSCALE_X16_DEST_VAL - SL_LIDAR_VARBITSCALE_X8_DEST_VAL)<<3) + \ 347 ((SL_LIDAR_VARBITSCALE_X8_DEST_VAL - SL_LIDAR_VARBITSCALE_X4_DEST_VAL)<<2) + \ 348 ((SL_LIDAR_VARBITSCALE_X4_DEST_VAL - SL_LIDAR_VARBITSCALE_X2_DEST_VAL)<<1) + \ 349 SL_LIDAR_VARBITSCALE_X2_DEST_VAL - 1)
sl_u16 start_angle_sync_q6
struct _sl_lidar_payload_express_scan_t __attribute__((packed)) sl_lidar_payload_express_scan_t
sl_lidar_response_measurement_node_hq_t node_hq[96]
sl_u16 start_angle_sync_q6
sl_lidar_response_cabin_nodes_t cabins[16]
sl_u16 start_angle_sync_q6
sl_u16 express_sample_duration_us
sl_u16 std_sample_duration_us
sl_lidar_response_ultra_cabin_nodes_t ultra_cabins[32]