Fix compute checksum
This commit is contained in:
parent
20d8df4a3b
commit
e061430e61
|
@ -53,7 +53,7 @@ bool unpack_stereo_img_data(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint8_t checksum = 0;
|
std::uint8_t checksum = 0;
|
||||||
for (std::size_t i = 1, n = packet_n - 2; i <= n; i++) {
|
for (std::size_t i = 2, n = packet_n - 2; i <= n; i++) { // content: [2,9]
|
||||||
checksum = (checksum ^ packet[i]);
|
checksum = (checksum ^ packet[i]);
|
||||||
}
|
}
|
||||||
if (checksum != img_packet.checksum) {
|
if (checksum != img_packet.checksum) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user