From 0e5f4d79a5afd9a593895dcc05060dddff756993 Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <alberto.nidasio@skywarder.eu>
Date: Sun, 16 Apr 2023 12:09:26 +0200
Subject: [PATCH] [LIS2MDL] Fixed `ODR` definition

---
 src/shared/sensors/LIS2MDL/LIS2MDL.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/shared/sensors/LIS2MDL/LIS2MDL.h b/src/shared/sensors/LIS2MDL/LIS2MDL.h
index 77227a9f2..ef5c00c41 100644
--- a/src/shared/sensors/LIS2MDL/LIS2MDL.h
+++ b/src/shared/sensors/LIS2MDL/LIS2MDL.h
@@ -39,10 +39,10 @@ class LIS2MDL : public Sensor<LIS2MDLData>
 public:
     enum ODR : uint8_t
     {
-        ODR_10_HZ  = 0x00,  ///< 10 Hz
-        ODR_20_HZ  = 0x04,  ///< 20 Hz
-        ODR_50_HZ  = 0x08,  ///< 50 Hz
-        ODR_100_HZ = 0x18,  ///< 100 Hz
+        ODR_10_HZ  = 0b00 << 2,  ///< 10 Hz
+        ODR_20_HZ  = 0b01 << 2,  ///< 20 Hz
+        ODR_50_HZ  = 0b10 << 2,  ///< 50 Hz
+        ODR_100_HZ = 0b11 << 2,  ///< 100 Hz
     };
 
     enum OperativeMode : uint8_t
-- 
GitLab