From d4547c5525e434cd990e18284542b2a63aa86dcb Mon Sep 17 00:00:00 2001 From: KalmanSLightech Date: Mon, 23 Jul 2018 17:15:20 +0800 Subject: [PATCH] fix imu count bug --- src/internal/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/types.h b/src/internal/types.h index ac5992d..69d7d59 100644 --- a/src/internal/types.h +++ b/src/internal/types.h @@ -274,7 +274,7 @@ struct ImuResPacket { size = (*(data + 2) << 8) | *(data + 3); std::size_t seg_n = sizeof(ImuSegment); // 21 - std::uint8_t seg_count = (size - 4) / seg_n; + std::uint8_t seg_count = size / seg_n; ImuPacket packet(seg_count,data + 4); packets.push_back(packet); //packet(2);