From e061430e611fcb4a5e3a1770e31a464448e27bd7 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Mon, 9 Apr 2018 20:51:13 +0800 Subject: [PATCH] Fix compute checksum --- src/internal/streams.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/streams.cc b/src/internal/streams.cc index b6ddaef..29b4f49 100644 --- a/src/internal/streams.cc +++ b/src/internal/streams.cc @@ -53,7 +53,7 @@ bool unpack_stereo_img_data( } 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]); } if (checksum != img_packet.checksum) {