From 85b922383b65f713afb98b94cb5e12433dc4ae43 Mon Sep 17 00:00:00 2001 From: jflyper Date: Wed, 14 Mar 2018 22:24:39 +0900 Subject: [PATCH] MSP_RAW_IMU to convert accADC from float to integer (#5417) --- src/main/interface/msp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index 80de8d7b1..4bef60f98 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -798,7 +798,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) } for (int i = 0; i < 3; i++) { - sbufWriteU16(dst, acc.accADC[i] / scale); + sbufWriteU16(dst, lrintf(acc.accADC[i] / scale)); } for (int i = 0; i < 3; i++) { sbufWriteU16(dst, gyroRateDps(i));