From 6ddf76103a6b49fbe8721b219ce8240a4e27b8a9 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 31 May 2023 14:53:51 +0200 Subject: [PATCH] drivers/bmx055: fix crazy use of FPU --- drivers/bmx055/bmx055.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bmx055/bmx055.c b/drivers/bmx055/bmx055.c index b2014372ce..3aa50dc4a5 100644 --- a/drivers/bmx055/bmx055.c +++ b/drivers/bmx055/bmx055.c @@ -234,7 +234,7 @@ int bmx055_gyro_read(const bmx055_t *dev, int16_t *data) uint16_t scale; /* converting scale info into real scaling values */ - scale = (GYRO_2000_DPS / pow(2, dev->p.gyro_scale)); + scale = GYRO_2000_DPS >> dev->p.gyro_scale; /* reading gyroscope data */ i2c_acquire(BUS);