![Lightware LW24 LiDAR Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/lightware/lw24-lidar/lw24-lidar_product-manual_1915298022.webp)
for (let i =
0
; i < size; ++i) {
let code = crc >>>
8
&
0xFF
;
code ^= data[i] &
0xFF
;
code ^= code >>>
4
;
crc = crc <<
8
&
0xFFFF
;
crc ^= code;
code = code <<
5
&
0xFFFF
;
crc ^= code;
code = code <<
7
&
0xFFFF
;
crc ^= code;
}
return crc;
}
Receiving packets
Here is the process for reading the raw serial byte stream and identifying packets. Once a packet has been successfully
read it can be processed based on its command ID.
LW24/C/SI microLiDAR™ sensor - Product guide
|
Version 0
|
03 March 2022
Page
22
of
36