From e32a323e575518aa8e14fc823c175cbcb6e59155 Mon Sep 17 00:00:00 2001 From: TinyO Date: Tue, 21 May 2019 18:09:37 +0800 Subject: [PATCH] fix(imu params default): value default fix. 2 --- src/mynteye/device/channel/bytes.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mynteye/device/channel/bytes.cc b/src/mynteye/device/channel/bytes.cc index 4217bba..d0dc194 100644 --- a/src/mynteye/device/channel/bytes.cc +++ b/src/mynteye/device/channel/bytes.cc @@ -162,6 +162,22 @@ std::size_t from_data(ImuIntrinsics *in, const std::uint8_t *data, in->z[j] = _from_data(data + i + j * 8); } i += 16; + } else { + // temperature drift + // x + for (std::size_t j = 0; j < 2; j++) { + in->x[j] = 0.0; + } + i += 16; + // y + for (std::size_t j = 0; j < 2; j++) { + in->y[j] = 0.0; + } + i += 16; + // z + for (std::size_t j = 0; j < 2; j++) { + in->z[j] = 0.0; + } } return i;