Fix compute checksum

This commit is contained in:
John Zhao 2018-04-09 20:51:13 +08:00
parent 20d8df4a3b
commit e061430e61

View File

@ -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) {