From b2f6120fa57a94fefc59f2568b65b56e680079fe Mon Sep 17 00:00:00 2001 From: kalman Date: Fri, 29 Mar 2019 18:21:19 +0800 Subject: [PATCH] fix(adapter): fix img data unpack bug --- src/mynteye/device/standard2/streams_adapter_s2.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mynteye/device/standard2/streams_adapter_s2.cc b/src/mynteye/device/standard2/streams_adapter_s2.cc index c71f6d4..c33b179 100644 --- a/src/mynteye/device/standard2/streams_adapter_s2.cc +++ b/src/mynteye/device/standard2/streams_adapter_s2.cc @@ -42,8 +42,8 @@ struct ImagePacket { void from_data(std::uint8_t *data) { std::uint32_t timestamp_l; std::uint32_t timestamp_h; - header = *data & 0b0111; - is_ets = ((*data & 0b1000) == 0b1000); + header = *data & 0x7F; + is_ets = ((*data & 0x80) == 0x80); size = *(data + 1); frame_id = (*(data + 2) << 8) | *(data + 3); timestamp_h = (*(data + 4) << 24) | (*(data + 5) << 16) |