From 1c219a0b26a67ab9d1efd86338175ad12a07e865 Mon Sep 17 00:00:00 2001 From: "Jacob.lsx" Date: Thu, 28 Jan 2021 17:46:50 +0800 Subject: [PATCH] [Fix]: a variable type problem causes the gyro output to be zero --- src/mynteye/device/channel/channels.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mynteye/device/channel/channels.cc b/src/mynteye/device/channel/channels.cc index 127cb10..c1ef05e 100644 --- a/src/mynteye/device/channel/channels.cc +++ b/src/mynteye/device/channel/channels.cc @@ -45,9 +45,9 @@ mynteye::ImuPacket2 to_pak2(const mynteye::ImuPacket& pak1, tpr.accel[0] = pak1.segments[i].accel[0] * 1.f * accel_range / 0x10000; tpr.accel[1] = pak1.segments[i].accel[1] * 1.f * accel_range / 0x10000; tpr.accel[2] = pak1.segments[i].accel[2] * 1.f * accel_range / 0x10000; - tpr.gyro[0] = pak1.segments[i].gyro[0] * gyro_range / 0x10000; - tpr.gyro[1] = pak1.segments[i].gyro[1] * gyro_range / 0x10000; - tpr.gyro[2] = pak1.segments[i].gyro[2] * gyro_range / 0x10000; + tpr.gyro[0] = pak1.segments[i].gyro[0] * 1.f * gyro_range / 0x10000; + tpr.gyro[1] = pak1.segments[i].gyro[1] * 1.f * gyro_range / 0x10000; + tpr.gyro[2] = pak1.segments[i].gyro[2] * 1.f * gyro_range / 0x10000; tpr.flag = pak1.segments[i].flag; tpr.frame_id = pak1.segments[i].frame_id; tpr.is_ets = pak1.segments[i].is_ets;